# collectionOffer

## collectionOffer()

```python
async def collectionOffer(gift_name: str, amount: float | int, expiration_days: int, max_nfts: int, authData: str) -> None
```

*Create an offer for the gift collection by gift name*

### Returns

`None` if the collection offer was created successfully

### Raises

* `authDataError` if `authData` is not provided
* `offerError` if `gift_name`, `amount` aren't provided
* `offerError` if `expiration_days` isn't `0` or `7`.
* `requestError` if request fails.

### Parameters

* `gift_name` (str): The name of the gift collection.
* `amount` (float | int): The amount in TON  - price you're offering
* `expiration_days` (int): The number of days after which the offer expires. Use `0` for no expiration and `7` for a 7-day expiration. Defaults to `7`.
* `max_nfts` (int): The maximum number of NFTs for the offer. Defaults to `1`.
* `authData` (str): Authentication data required to create the offer.

### Example

Create an offer for Plush Pepe collection for 1 TON with 7 days expiration (default) and 1 max\_nfts (default):

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

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

async def main():
    await collectionOffer(gift_name = "Plush Pepe", amount = 1, authData = auth)
```

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