v1
latestOpenAPI 3.0.02026-07-136017.3 KBgenerates a quote
By passing in the appropriate options, you can generate a swap quote
Path parameters
chainId
Query parameters
referrer
input token address
output token address
input token amount
amount of the fee, for example 0.0025 (0.25%)
if fee > 0 then which token to take fee from input or output
the max price impact for route planning. It's better to set it to a reasonable value, for example 1 (100%)
the max slippage for route execution, for example 0.005 (0.5%)
a list of DEX names separated by comma. If exists in the request then only pools from these DEXes are used in the response route. List of all supported DEXes can be obtained with /liquidity-provider request
a list of pools addresses separated by comma. If exists in the request then only these pools are used in the response route
a list of DEX names separated by comma. If exists in the request then pools from these DEXes are excluded in the response route. List of all supported DEXes can be obtained with /liquidity-provider request
a list of pools addresses separated by comma. If exists in the request then these pools are excluded in the response route
a list of token addresses separated by comma. If exists in the request then pools with these tokens are excluded in the response route
vizulaization
Response
quote
Example response
{
"status": "Success",
"tokens": [
{
"address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"symbol": "ETH",
"name": "Ether",
"decimals": 18
},
{
"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"symbol": "WETH",
"name": "Wrapped Ether",
"decimals": 18
},
{
"address": "0x6B3595068778DD592e39A122f4f5a5cF09C90fE2",
"symbol": "SUSHI",
"name": "SushiToken",
"decimals": 18
}
],
"tokenFrom": 0,
"tokenTo": 2,
"swapPrice": 2837.6709246572527,
"priceImpact": -0.002204113661183449,
"amountIn": "10000000000000000",
"assumedAmountOut": "28376709246572527616"
}