GET /v1/{chainID}/quote
Returns the best exchange offer and input parameters for the transaction
Input Parameters
chainID
+
ID of the blockchain tokens must be exchanged on (supported networks - v1/platforms
).
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 /tokens
).
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 /gasprices
.
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
amount_out_total
str
The amount of purchase tokens in decimals of the token.
estimate_gas_total
str
The estimated amount of gas that will be used during the transaction.
gas_price
str
Gas price value for a transaction in WEI (nAVAX for Avalanche).
fee_recipient_amount
str
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
str
Smart contract address of the sale token.
token_out
str
Smart contract address of the purchase token.
routes
array
An array of DEXs the transaction will be carried out through.
protocol_name
str
DEX name the transaction will be carried out through.
percent
int
The percent of amount will be swapped on the current DEX.
calldata
str
One of the input parameters for processing a transaction for tokens exchange.
to
str
Smart contract address where input parameters should be sent to.
Request Example
Response Example
Last updated