Build an EVM swap (/swap-instructions)
The same handler as POST /evm/swap: same body, same response, under the path name a
Solana or Jupiter client calls. On EVM there are no instructions to assemble: the answer is
the unsigned transactions, setupTransactions (the approvals) then swapTransaction, to
sign and send in that order.
POST /evm/swap, under the path name Solana and Jupiter clients call.
setupTransactions (the approvals) then swapTransaction, to sign and send in that order. See EVM swaps.Authorizations
Body
The wallet that signs and sends every transaction and pays the input: the from of each. Alias wallet
^0[xX][0-9a-fA-F]{40}$A quote of this router, sent back unchanged: its quoteId is what is built. Its chain, inputMint, outputMint, inAmount, outAmount, otherAmountThreshold and slippageBps, when present, must be the stored quote's (400 quote_mismatch): a new slippage goes in the top-level slippageBps
Instead of quoteResponse: the id of the quote to build
The address that receives the output. Default userPublicKey; must equal it for a wrap or an unwrap (422 declined recipient_unsupported). Alias recipient
^0[xX][0-9a-fA-F]{40}$With a quote: a new floor for this build only, outAmount × (10000 − slippageBps) / 10000 from the quote's outAmount (above 10000 counts as 10000; no effect on a wrap or an unwrap). Pair mode: the quote's slippage, default 50
Pair mode: as in POST /evm/quote. With a quote, if present, must be its chain
Pair mode: the token you spend. With a quote, if present, must be its input
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
Pair mode: the token you receive. With a quote, if present, must be its output
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
Pair mode: as in POST /evm/quote. With a quote, if present, must be its inAmount
Pair mode only
ExactIn, exactIn Pair mode only
Pair mode only
Pair mode only. Alias includeDex
Pair mode only. Alias excludeDex
Only 0: no platform fee on EVM (above 0 is 400; so is platformFeeBps)
Response
The unsigned transactions and their simulation (live answers of the public router; 0x…dEaD is a burn address that happens to hold ETH and USDC on Base, used so the simulations could pass)
The approvals, to send first and in order: none, approve(inAmount), or approve(0) then approve(inAmount)
The swap, to send after the approvals and before deadline
The quote built (in pair mode, the quote made for this call)
The quote's outAmount. What arrives at the build's block is simulation.outAmount
The floor in the swap's calldata: the quote's, or moved by this build's slippageBps
"ExactIn"The slippage of this build's floor
The approvals and the swap, executed in order at the build's block before you send anything
- passed
- failed
- requires_approval
- not_simulated
What the transactions cost besides the input, in wei as decimal strings; null where unknown
The venue's router the approvals are for, when the input is an ERC-20 swapped through a pool; null for a native input, a wrap or an unwrap
Unix seconds: the swap reverts if mined later. The chain's deadlineSecs after the build (60 s; 180 s on eth)
eth (chain id 1), bsc (56), base (8453), robinhood (4663)
eth, bsc, base, robinhood The block number the build was read and simulated at
That block's hash
The quote's expiry: until then it can be built again