> For the complete documentation index, see [llms.txt](https://docs.yad.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yad.finance/~/changes/2RSiZ02fGs3gXznJHipO/api-documentation/endpoints-and-functions/get-v1-chainid-transaction-approve.md).

# GET v1/{chainID}/transaction/approve

Generates transaction input parameters to provide access to the user's tokens for the exchange smart contract

## **Input Parameters**

| Name             | Required | Description                                                                                                                                                      |
| ---------------- | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **chainID**      |     +    | ID of the blockchain the token is located on (supported networks - `/v1/platforms`).                                                                             |
| **tokenAddress** |     +    | Address of the smart contract of the token for which the access request is generated.                                                                            |
| **amount**       |     -    | The amount of user tokens to which access is granted. By default - infinite number.                                                                              |
| **gasPrice**     |     -    | Value of gas price for making a transaction in WEI (nAVAX for Avalanche) (1 GWEI = 1000000000 WEI), default value – the value high from the method `/gasprices`. |

## **Response Options**

| Name              | Data Type | Description                                                                          |
| ----------------- | --------- | ------------------------------------------------------------------------------------ |
| **calldata**      | `str`     | One of the input parameters for processing a transaction providing access to tokens. |
| **estimate\_gas** | `str`     | The estimated amount of gas that will be used during the transaction.                |
| **gas\_price**    | `str`     | Gas price value for a transaction in WEI.                                            |
| **to**            | `str`     | Address of the smart contract the transaction should be sent to.                     |

## **Request Example**

```
https://api.yad.finance/v1/1/transaction/approve?tokenAddress=0xdAC17F958D2ee523a2206206994597C13D831ec7&amount=100000000000&gasPrice=100000000000
```

## **Response Example**

```
{
  "calldata": "0x095ea7b30000000000000000000000001aaad07998466cd3eb8140827dddb37570be1e63000000000000000000000000000000000000000000000000000000174876e800",
  "gas_price": "100000000000",
  "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
  "estimate_gas": "48561"
}
```
