v1
latestOpenAPI 3.0.02026-07-26278284.4 KBDeFi Shortcuts
Optimal route between two tokens
Calculates optimal transaction with the best route between two tokens, which may involve several actions that interact with various DeFi protocols. This single call already quotes internally and returns executable calldata along with amountOut and gas, so there is no separate quote step to call beforehand. <Tip>To enter a non-tokenized position, use the GET /shortcuts/route/nontokenized.</Tip>
post/api/v1/shortcuts/route
Request body
Example request
{
"fromAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"amountIn": [
"1000000000000000000"
],
"tokenIn": [
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
],
"tokenOut": [
"0x6b175474e89094c44da98b954eedeac495271d0f"
],
"receiver": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"spender": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"slippage": "300",
"fee": [
"100"
],
"feeReceiver": "0x220866B1A2219f40e72f5c628B65D54268cA3A9D",
"refundReceiver": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
}