Skip to main content
POST

Authorizations

X-API-Key
string
header
required

Body

application/json
wallet
string
required

Payer wallet public key

Example:

"62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm"

inputMint
string
required

Input token mint address

Example:

"So11111111111111111111111111111111111111112"

outputMint
string
required

Output token mint address

Example:

"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"

amount
integer
required

Amount in input token base units (lamports for SOL)

Example:

1000000000

swapMode
enum<string>
default:exactIn

Swap mode — exactIn or exactOut

Available options:
exactIn,
exactOut
slippageBps
integer
default:500
Required range: 0 <= x <= 10000
Example:

500

tipWallet
string

Wallet to receive tip (auth only)

tipLamports
number

Tip amount in lamports (auth only)

Example:

5000

feeWallet
string

Wallet to receive fee (auth only)

feeBps
number

Fee in basis points (auth only)

Example:

50

feeOnInput
boolean

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).

feeTipLamports
number

Tip in lamports (public shorthand — floored at the relay minimum).

Required range: x >= 1000000
transactionsFeeLamports
number

Priority fee per transaction in lamports

Example:

100000

maxHops
integer

Cap the route search depth (1–3 hops).

Required range: 1 <= x <= 3
includeDex

Only 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.

excludeDex

Never route through these DEXes. Wins over includeDex.

serialize
boolean

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.

routeTicket
string

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.

refetch
boolean

Force a fresh re-quote even when routeTicket is present (explicit fallback after a 409).

Response

Swap instructions generated

success
boolean
required
Example:

true

instructions
object[]
required

Raw swap instructions to include in your own transaction

addressLookupTableAddresses
string[]

Address Lookup Table addresses needed for the transaction

transaction
string

Base64 unsigned v0 transaction (fee payer = wallet, fresh blockhash, ALTs resolved). Present only when the request set serialize: true.