# allCollectionOffers

## allCollectionOffers()

```python
async def allCollectionOffers(gift_name: str, authData: str) -> list[CollectionOffer]
```

*Retrieve all collection offers for certain gift collection by gift name*

### Returns

`list` of `CollectionOffer` objects

### Raises

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

### Parameters

* `gift_name` (str): name of the gift collection
* `authData` (str): Authentication data required to cancel the offer.

### CollectionOffer object

#### Methods

* `.toDict()` - converts the `CollectionOffer` object back to a dict

#### Attributes

* `.id` - retrieves `offer_id`
* `.collection_id` - the id of the collection
* ~~`.sender_id` - `id` of the offer sender *(as far as i know its always*\_ **`None`**)\_~~
* `.amount` - amount of TON offered
* `.max_nfts` - how many nfts can be bought with this offer
* `.current_nfts` - how many nfts have already been bought with this offer
* `.status` - status of the offer
* `.created_at` - date+time of when the offer was created
* `.updated_at` - date+time of when the offer was updated (if was)
* `.expires_at` - expiration date+time of the offer
* `.name` - name of the gift collection
* `.short_name` - short name of the gift collection
* `.photo_url` - url link to the photo that represents the gift collection
* `.floor_price` - lowest price for the gift from the collection

### Example

```python
from aportalsmp.offers import allCollectionOffers
from aportalsmp.auth import update_auth
import asyncio

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

async def main():
    offers = await allCollectionOffers(gift_name = "Plush Pepe", authData = auth)
    for offer in offers:
        print(offer.amount, offer.status)
        ...
```

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