Skip to main content
POST
Build an EVM swap (alias of /evm/swap)
The same handler as POST /evm/swap, under the path name Solana and Jupiter clients call.
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. See EVM swaps.

Authorizations

x-api-key
string
header
required

Body

application/json
userPublicKey
string
required

The wallet that signs and sends every transaction and pays the input: the from of each. Alias wallet

Pattern: ^0[xX][0-9a-fA-F]{40}$
quoteResponse
object

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

quoteId
string<uuid>

Instead of quoteResponse: the id of the quote to build

destinationTokenAccount
string

The address that receives the output. Default userPublicKey; must equal it for a wrap or an unwrap (422 declined recipient_unsupported). Alias recipient

Pattern: ^0[xX][0-9a-fA-F]{40}$
slippageBps

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

chain

Pair mode: as in POST /evm/quote. With a quote, if present, must be its chain

inputMint
string

Pair mode: the token you spend. With a quote, if present, must be its input

Example:

"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"

outputMint
string

Pair mode: the token you receive. With a quote, if present, must be its output

Example:

"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"

amount

Pair mode: as in POST /evm/quote. With a quote, if present, must be its inAmount

swapMode
enum<string>

Pair mode only

Available options:
ExactIn,
exactIn
maxHops

Pair mode only

onlyDirectRoutes
boolean

Pair mode only

dexes

Pair mode only. Alias includeDex

excludeDexes

Pair mode only. Alias excludeDex

feeBps

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)

setupTransactions
object[]
required

The approvals, to send first and in order: none, approve(inAmount), or approve(0) then approve(inAmount)

swapTransaction
object
required

The swap, to send after the approvals and before deadline

quoteId
string<uuid>
required

The quote built (in pair mode, the quote made for this call)

inAmount
string
required
outAmount
string
required

The quote's outAmount. What arrives at the build's block is simulation.outAmount

otherAmountThreshold
string
required

The floor in the swap's calldata: the quote's, or moved by this build's slippageBps

swapMode
string
required
Allowed value: "ExactIn"
slippageBps
integer
required

The slippage of this build's floor

routePlan
object[]
required
simulation
passed · object
required

The approvals and the swap, executed in order at the build's block before you send anything

costs
object
required

What the transactions cost besides the input, in wei as decimal strings; null where unknown

spender
string | null
required

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

deadline
integer
required

Unix seconds: the swap reverts if mined later. The chain's deadlineSecs after the build (60 s; 180 s on eth)

chain
enum<string>
required

eth (chain id 1), bsc (56), base (8453), robinhood (4663)

Available options:
eth,
bsc,
base,
robinhood
chainId
integer
required
contextSlot
integer
required

The block number the build was read and simulated at

blockHash
string
required

That block's hash

expiresAt
string<date-time>
required

The quote's expiry: until then it can be built again