Get quote
Get the best route and expected output amount.
What /quote returns
/quote returnsRequest parameters
Example request
curl "https://api.dirol.io/api/v1/quote?tokenIn=0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A&tokenOut=0x754704Bc059F8C67012fEd69BC8A327a5aafb603&amount=1000000000000000000"Example response
{
"tokenIn": "0x3bd359c1119da7da1d913d1c4d2b7c461115433a",
"tokenOut": "0x754704bc059f8c67012fed69bc8a327a5aafb603",
"amountIn": "1000000000000000000",
"amountOut": "385274",
"routes": [
{
"pool": "0xab12...ef34",
"poolType": "V3",
"tokenIn": "0x3bd359c1119da7da1d913d1c4d2b7c461115433a",
"tokenOut": "0x754704bc059f8c67012fed69bc8a327a5aafb603",
"tokenInSymbol": "WMON",
"tokenOutSymbol": "USDC",
"factory": "CapricornV3",
"factoryAddress": "0x...",
"amountIn": "1000000000000000000",
"amountOut": "385274",
"weight": 10000
}
],
"priceImpactBps": 12,
"amountInUsd": "0.39",
"amountOutUsd": "0.39"
}JavaScript example
How to read routes
routesDirect route
Multi-hop route
Split route
Excluding sources
Notes
Last updated