Skip to main content
GET
Quote a swap
Guide: Quote and swap. Errors: quote declines.

Authorizations

x-api-key
string
header
required

Query Parameters

inputMint
string
required

Mint you spend (base58)

Example:

"So11111111111111111111111111111111111111112"

outputMint
string
required

Mint you receive (base58). Equal to inputMint asks for a profitable cycle (404 no_cycle when none)

Example:

"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

amount
string
required

u64 in base units: the input for ExactIn, the output for ExactOut. 0 is 400 zero_amount

Pattern: ^[0-9]+$
Example:

"100000000"

swapMode
enum<string>
default:ExactIn

ExactIn or ExactOut (exactIn / exactOut also accepted)

Available options:
ExactIn,
ExactOut,
exactIn,
exactOut
slippageBps
integer
default:50

Tolerance in basis points, 0–10000; above 10000 is 400

Required range: 0 <= x <= 10000
maxHops
integer
default:4

Most hops per route, 1–4 (0 counts as 1). It can only tighten the operator's ROUTER_MAX_HOPS (default 4)

Required range: 0 <= x <= 255
onlyDirectRoutes
boolean
default:false

true is maxHops=1: a single pool

dexes
string

Only these venues: comma-separated dex labels or aliases from /venues, or the parameter repeated. Alias includeDex (send one of the two names, not both). Unknown labels next to known ones are ignored; only unknown labels is 400

Example:

"Raydium CLMM,Meteora DLMM"

excludeDexes
string

Never these venues, same format as dexes; unknown labels are ignored. Alias excludeDex

Example:

"PumpSwap"

allowSplit
boolean
default:false

Allow two routes in one transaction (two swap instructions, see swapInstructions). Served only when it beats the best single route by at least 1 bps and fits the transaction; never for ExactOut, cycles or with a platform fee. Send it only if you sign every entry of swapInstructions

platformFeeBps
integer
default:0

Your integrator fee in basis points, priced into inAmount/outAmount; above 1000 is capped at 1000 (platformFee.feeBps says what was priced). Build with feeAccount. Turns off allowSplit

Required range: 0 <= x <= 65535
feeOnInput
boolean

Which mint the platform fee is taken in: true the input, false the output. Default: the input when inputMint is SOL, USDC, USDT or USD1, otherwise the output. ExactOut always takes it on the input (false is 400)

forJitoBundle
boolean
default:false

You will add a Jito tip: keeps one account key free for it and excludes HumidiFi

reserveKeys
integer
default:0

Account keys you will add to the transaction beyond the build's; only a route that still fits 64 keys with them is served

Required range: 0 <= x <= 255
asLegacyTransaction
boolean
default:false

Only false is accepted: this router emits v1 transactions

Response

The quote

inputMint
string
required
inAmount
string
required

What leaves the wallet, platform fee included. ExactIn: the amount asked

outputMint
string
required
outAmount
string
required

What arrives, net of venue and platform fees. ExactOut: the amount asked

otherAmountThreshold
string
required

ExactIn: the least that arrives, outAmount × (10000 − slippageBps) / 10000. ExactOut: the most that is spent, inAmount × (10000 + slippageBps) / 10000

swapMode
enum<string>
required
Available options:
ExactIn,
ExactOut
slippageBps
integer
required
priceImpactPct
string
required

Price impact as a decimal fraction (0.01 is 1%). 0 when it is not known

routePlan
object[]
required

The hops in order. A split is two routes one after the other: a route ends at the first step whose outputMint is the quote's

contextSlot
integer

The router's head slot (the newest slot its account stream had reached) when the quote was priced

timeTaken
number

Seconds spent inside the router

platformFee
object

Present when platformFeeBps > 0

quoteId
string

16 hex digits; the build of this quote carries the same quoteId

routeTicket
string

The route signed with HMAC-SHA256 (base64url(JSON).base64url(MAC)), valid for ROUTER_TICKET_TTL_S (default 60 s). Only when the router sets ROUTER_TICKET_SECRET: the public router never returns it

Example:

"eyJ2IjoyLCJxdW90ZUlkIjoiMjNlMTRlMDEwMDAwNDRjNiIsImlucHV0TWlu…"