Skip to main content
POST
Quote a swap (JSON body)
Guide: Quote and swap.

Authorizations

x-api-key
string
header
required

Body

application/json
inputMint
string
required

Mint you spend

outputMint
string
required

Mint you receive; equal to inputMint asks for a cycle

amount
required

u64 in base units: the input for ExactIn, the output for ExactOut

swapMode
enum<string>
default:ExactIn
Available options:
ExactIn,
ExactOut,
exactIn,
exactOut
slippageBps
default:50

0–10000

maxHops

1–4; can only tighten the operator's limit

onlyDirectRoutes
boolean
default:false
dexes

Only these venues. Alias includeDex

excludeDexes

Never these venues. Alias excludeDex

allowSplit
boolean
default:false
platformFeeBps
default:0

0–1000 (higher is capped)

feeOnInput
boolean
forJitoBundle
boolean
default:false
reserveKeys
default:0

0–255

asLegacyTransaction
boolean

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

Slot of the pool state the quote was priced on

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 your router sets ROUTER_TICKET_SECRET

Example:

"eyJ2IjoyLCJxdW90ZUlkIjoiMjNlMTRlMDEwMDAwNDRjNiIsImlucHV0TWlu…"