v1
latestOpenAPI 3.1.02026-07-24223580832.9 KBGet DEX Swap Price
Retrieves a swap quotation for a given token pair or a series of tokens along a specified path. By providing an input amount (amountIn), the endpoint calculates and returns the estimated output amounts for each token in the swap path. This allows users to accurately gauge current market pricing and estimate the value of potential swaps on a decentralized exchange, facilitating more informed trading decisions.
💡 Compute Unit Value: 70 (Fixed)
Query parameters
The unique ID to specify the decentralized exchange (DEX) within a particular blockchain. Find more here.
The unique ID to specify the decentralized exchange (DEX) within a particular blockchain. Find more here.
Comma-separated values of token addresses whose price is to be fetched.
Comma-separated values of token addresses whose price is to be fetched.
Amount of token.
Amount of token.
A comma-separated list of currency symbols to convert the amount into, such as 'USD,EUR'. This parameter is optional and allows retrieving values in multiple fiat currencies.
A comma-separated list of currency symbols to convert the amount into, such as 'USD,EUR'. This parameter is optional and allows retrieving values in multiple fiat currencies.
Different pool based on the fees. By default, it will take the pool with maximum amountOut.
Different pool based on the fees. By default, it will take the pool with maximum amountOut.
Percentage of total swap value. By default, 1.
Percentage of total swap value. By default, 1.
Response
Successful response
Example response
{
"status": 200,
"msg": "success",
"data": {
"amountIn": "100000000000000000",
"path": [
"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
],
"amountsOut": [
"100000000000000000",
"212386733"
],
"prices": {
"usd": [
{
"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1": "2125.29"
},
{
"0xaf88d065e77c8cC2239327C5EDb3A432268e5831": "0.999664134155166"
}
]
},
"priceImpact": {
"percentage": "0.0214",
"value": "0.045422"
}
}
}