# editCollectionOffer

## editCollectionOffer()

```python
async def editCollectionOffer(amount: float | int, offer_id: str, max_nfts: int, authData: str) -> None
```

*Edit an existing collection offer's price & max\_nfts*

### Returns

`None` if the collection offer's price / max\_nfts was edited successfully

### Raises

* `authDataError` if `authData` is not provided
* `offerError` if `offer_id`, `amount` aren't provided
* `requestError` if request fails.

### Parameters

* `amount` (float | int): The amount in TON  - price you're offering
* `offer_id` (str): ID of the offer to edit
* `max_nfts` (int): The maximum number of NFTs for the offer. Defaults to `1`.
* `authData` (str): Authentication data required to edit the offer.

### Example

Add 0.01 TON to all existing collection offers

```python
from aportalsmp.offers import editCollectionOffer, myCollectionOffers
from aportalsmp.auth import update_auth
import asyncio

auth = asyncio.run(update_auth(api_id=123, api_hash="..."))

async def main():
    my_offers = await myCollectionOffers(authData = auth)
    for offer in my_offers:
        await editCollectionOffer(amount = offer.amount + 0.01, offer_id = offer.id)
```

***See used functions:*** [*myCollectionOffers*](https://bleach-1.gitbook.io/aportalsmp/documentation/aportalsmp.offers/mycollectionoffers)*,* [*update\_auth*](https://bleach-1.gitbook.io/aportalsmp/documentation/aportalsmp.auth/update_auth)
