Get swap instructions
Get raw swap instructions and address lookup tables for building custom transactions.
Requires API key.
Authorizations
Body
Payer wallet public key
"62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm"
Input token mint address
"So11111111111111111111111111111111111111112"
Output token mint address
"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"
Amount in input token base units (lamports for SOL)
1000000000
Swap mode — exactIn or exactOut
exactIn, exactOut 0 <= x <= 10000500
Wallet to receive tip (auth only)
Tip amount in lamports (auth only)
5000
Wallet to receive fee (auth only)
Fee in basis points (auth only)
50
Take the on-chain CPI fee from the input token (true) or the output token (false). Omitted ⇒ router default (the SOL/stable side of the trade).
Tip in lamports (public shorthand — floored at the relay minimum).
x >= 1000000Priority fee per transaction in lamports
100000
Cap the route search depth (1–3 hops).
1 <= x <= 3Only route through these DEXes (array or CSV). Labels match the quote response route[].dex, case/spacing-insensitive. Use this to PIN the route this endpoint re-quotes internally.
Never route through these DEXes. Wins over includeDex.
When true, the response also carries transaction: a ready-to-sign
unsigned v0 transaction (base64) with wallet as fee payer, a
fresh blockhash, and the address lookup tables already resolved
server-side. A browser wallet can deserialize → sign → send with no
ALT or blockhash refetch of its own.
Route ticket from a /quote response — build EXACTLY the quoted plan (no re-quote). Expired ⇒ 409 route_expired; malformed/forged ⇒ 400 invalid_route_ticket; pair/amount/swapMode mismatch ⇒ 400 route_ticket_mismatch.
Force a fresh re-quote even when routeTicket is present (explicit fallback after a 409).
Response
Swap instructions generated
true
Raw swap instructions to include in your own transaction
Address Lookup Table addresses needed for the transaction
Base64 unsigned v0 transaction (fee payer = wallet, fresh blockhash, ALTs resolved). Present only when the request set serialize: true.
