Quote API
Last updated
Was this helpful?
Last updated
Was this helpful?
Get the exchange rate for two assets on a specific provider. This is a development endpoint and is not intended for production use.
/aggregator/tokens/quote/pairPrice
Token to sell (e.g. ETH.UNI-0x1f9840a85d5af5bf1d1762f925bdaddc4201f984)
Token to buy (e.g. BTC.BTC)
The provider to query
UNISWAPV2
, UNISWAPV3
, THORCHAIN
, ZEROX
, ONEINCH
, SUSHISWAP
Get a quote to swap between Native Coin - ERC20 - Avax ERC20
/aggregator/tokens/quote
Asset to sell. (e.g. ETH.UNI-0x1f9840a85d5af5bf1d1762f925bdaddc4201f984)
Asset to buy. (e.g. BTC.BTC)
Amount of sellAsset to sell in assetAmount. (e.g. 100 for 100 UNI)
Slippage tolerance as a percentage. (e.g. 3 means 3% max slippage)
The maximum number of trades routes to return. (e.g. 5)
The senderAddress to be used to build calldata. (e.g. 0x2A1Af1d52641b9B595dbafFe36452d325E6cA103)
The recipientAddress may be used to build the tcMemo. If you don't provide a recipientAddress, your calldata may be invalid and you may need to replace {recipientAddress} in the memo field. (e.g. 0x2A1Af1d52641b9B595dbafFe36452d325E6cA103)
Restrict liquidity sources. THORCHAIN provider must be set for cross-chain quotes
Restrict sources of the providers.
Optionally specify the provider the swap should use.
UNISWAPV2
, UNISWAPV3
, THORCHAIN
, ZEROX
, ONEINCH
, SUSHISWAP
The affiliate thorname to receive the affiliate fee. Must be 10 chars or less, the shorter the better. (e.g. partner1)
Basis point to take from the trade (e.g. 50 for 0.5%)
If set to true, the API will adjust the memo so that the total affiliate fees, including smart contract, are as close as possible to the provided affiliateBasisPoints
If set to true, we will not perform any safety checks on the recipient address on an EVM chain. This is risky, and funds will likely be lost. For more information https://docs.thorswap.net/aggregation-api/pathfinder#smart-contract-addresses