# cancelCollectionOffer

## cancelCollectionOffer()

```python
async def cancelCollectionOffer(offer_id: str, authData: str) -> None
```

*Cancel an existing collection offer*

### Returns

`None` if the collection offer was cancelled successfully

### Raises

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

### Parameters

* `offer_id` (str): ID of the offer to cancel
* `authData` (str): Authentication data required to cancel the offer.

### Example

Cancel all existing collection offers

```python
from aportalsmp.offers import cancelCollectionOffer, 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 cancelCollectionOffer(offer_id = offer.id, authData = auth)
```

***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)
