Buy tokens
Build buy transactions for one or more wallets.
Amount resolution:
amounts[]— per-wallet SOL amounts (takes precedence)inputMint+inputAmountRaw— non-SOL input routesolAmount— uniform SOL amount for all wallets (default: 1 SOL)
Authorizations
Body
1"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"
Uniform SOL amount per wallet. Required if amounts not provided (SOL input only).
0.1
Per-wallet SOL amounts. Required if solAmount not provided (SOL input only).
Input token mint. Omit for native SOL input. Use for non-SOL → token swaps.
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
Raw input amount in token base units. Required when inputMint is provided.
1000000
Slippage tolerance in basis points. Defaults to 500 (5%) when omitted.
0 <= x <= 10000500
Priority fee per transaction in lamports
100000
Tip recipient wallet. Omitted ⇒ no tip transfer.
Tip amount in lamports. Omitted ⇒ no tip transfer.
1000000
Platform-fee recipient wallet — any wallet you choose. Omitted ⇒ no percentage fee.
Platform fee in bps, capped on-chain at 1000 (10%). Omitted ⇒ no percentage fee. Charged only on routes built through the Raze CPI router.
50
Take on-chain CPI fee from input token (true) or output (false). Omitted uses router default (SOL/stable side).
Append JITO_DONT_FRONT marker. Only safe for a single non-bundled tx — Jito rejects bundles containing this marker. Default false.
exactOut buy — exact output token qty (human units, ×1e6 like sells). Pair with swapMode exactOut.
exactIn (default, spend solAmount) or exactOut (receive tokensAmount)
exactIn, exactOut Cap route search depth (1–3 hops)
1 <= x <= 3Only route through these DEXes (array or CSV). Labels match quote route[].dex.
Never route through these DEXes. Wins over includeDex.
Output-token recipient wallet. Omitted or equal to payer ⇒ self-buy. Distinct wallet ⇒ token lands in recipient ATA (payer signs+funds; recipient never signs). CPI-router only.
Route ticket from a /quote response. Wallets whose amount equals the ticket's amountIn build EXACTLY the quoted plan (no re-quote); wallets with a different amount re-quote normally. Expired ticket ⇒ 409 route_expired (whole request); malformed/forged ⇒ 400 invalid_route_ticket; different pair or swap mode ⇒ 400 route_ticket_mismatch.
base58, base64 Response
Transactions generated
true
Unsigned transactions ready to be signed and submitted
Per-tx built output amount (raw), index-aligned with transactions;
null where no route was found for that wallet. This is what the
transaction actually delivers (its on-chain min_return) — it can sit
below the amountOut a prior /quote returned when the best-priced
plan didn't fit the wire and a lower-output alternative was served.
