Quote and swap
Quote and build in one call
For contracts and bots that call the router directly: routes and encodes in a single request. The output goes to msg.sender; the caller approves the router for tokenIn and sends the calldata.
get/swap/calldata
Request
- Base URL: https://api.getchord.xyz/v1
- URL: https://api.getchord.xyz/v1/swap/calldata
- Auth: none declared
Query parameters
chain5042 | 4663 | 143 | 43114 | 8453 | 56 | 42161 | 1
Chain id: 5042 Arc · 4663 Robinhood Chain · 143 Monad · 43114 Avalanche C-Chain · 8453 Base · 56 BNB Chain · 42161 Arbitrum One · 1 Ethereum. Omitted = 143.
tokenInstring required
EVM address, hex, case-insensitive.
Token the caller approves and sends.
tokenOutstring required
EVM address, hex, case-insensitive.
Token returned to msg.sender.
amountInstring required
Amount in the token's smallest unit, as a decimal string. Never a float.
slippageBpsinteger
Sets minOut on the returned calldata.
Response
Router call.
Changes
No recorded changes to this operation across all 2 revisions of this API.