GET /v1/{chainID}/quote
Returns the best exchange offer and input parameters for the transaction
Input Parameters
Name | Required | Description |
---|---|---|
chainID | + | ID of the blockchain tokens must be exchanged on (supported networks - |
fromTokenAddress | + | Smart contract address of the sale token. |
toTokenAddress | + | Smart contract address of the purchase token. |
takerAddress | - | The address which will fill the quote. When provided the gas will be estimated and returned. |
amount | + | The amount of sale tokens in decimals of the token (can be taken from the method |
slippage | + | The amount of slippage allowed during the actual execution of the transaction (10 = 1% slippage). If the price changes by more than this percentage, the transaction will revert. Min = 1 (0.1%), max = 500 (50%). |
gasPrice | - | Gas price value for making a transaction in WEI (nAVAX for Avalanche) (1 GWEI = 1000000000 WEI), default value is the value high from |
feeRecipient | - | Wallet address for receiving fees. The commission is paid from the purchase token. |
buyTokenPercentageFee | - | Percentage of commission from the amount of purchase tokens, is taken in favor of feeRecipient. (10 = 1%, maximum value is 500). |
Response Options
Name | Data type | Description |
---|---|---|
amount_out_total |
| The amount of purchase tokens in decimals of the token. |
estimate_gas_total |
| The estimated amount of gas that will be used during the transaction. |
gas_price |
| Gas price value for a transaction in WEI (nAVAX for Avalanche). |
fee_recipient_amount |
| The amount of purchase tokens in decimals of the token, which will be taken in favor of feeRecipient. The value will be 0 if feeRecipient and buyTokenPercentageFee fields are not specified. |
token_in |
| Smart contract address of the sale token. |
token_out |
| Smart contract address of the purchase token. |
routes |
| An array of DEXs the transaction will be carried out through. |
protocol_name |
| DEX name the transaction will be carried out through. |
percent |
| The percent of amount will be swapped on the current DEX. |
calldata |
| One of the input parameters for processing a transaction for tokens exchange. |
to |
| Smart contract address where input parameters should be sent to. |
Request Example
Response Example
Last updated