Quote a swap
Returns the best route and estimated output for a token swap. On EVM chains, evm_routing has the full route details, including the block the quote was priced at. Use from_pool_id to force the first hop through a pool and to_pool_id to force the last hop; leave them out to let us pick. If no route uses a pool you forced, the request fails. Any transaction returned by the trading endpoints is signed by your own wallet.
Headers
Select long (full) or short (abbreviated) field names. HTTP defaults to long. Takes precedence over fields. See Response Format.
long, short Query Parameters
Body
Controls splitting a trade across several routes for a better price.
Omit to let us split large trades automatically. 0 disables
splitting. 2-20 sets how finely the split is searched (higher is
finer). All splits run in one transaction and are listed in
route.splits. A value other than 0 is not allowed with exact_out,
from_pool_id/to_pool_id, or some single-protocol trades.
x >= 0Response
Swap quote