Build a swap transaction
Returns a swap transaction for your wallet to sign. On EVM chains, evm.approval_transactions lists any token approvals needed first: send them in order, wait for them to confirm, then call this endpoint again before signing the swap. The simulation result (what the recipient would receive) is in quote.evm_routing. from_pool_id and to_pool_id force the first and last hop through those pools; the hops in between are found for you.
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
Transaction data to sign