swap program. It never signs and never sends: you get a quote, then instructions or an unsigned transaction, and your backend signs and broadcasts it.
Quote and swap
The two calls of every swap
Transactions
v1 transactions, compute budget, priority fee, tips
Platform fee
Charge your own fee on a swap
Perps
Open, close and manage perp positions
Public router
https://router.raze.bot is Raze’s router. It takes no key. It builds for Raze’s deploy of the swap program, DADMMjfNnY6z8H9h9RfHZ9tfarBySsj4Yb65qLyKJDAD: that is the programId of every swap instruction it returns. Perps are not enabled on it: GET /perp/markets lists no venue and every perp operation answers 422 venue_disabled.
One router, one program deploy
A router can also run for a client’s own deploy of theswap program: its address, its upgrade authority, the admin of its config. Every router builds for the program address it is configured with (ROUTER_SWAP_PROGRAM_ID), so the programId of every swap instruction you receive is that deploy. It reads that deploy’s on-chain config at boot and keeps it current:
- a venue the config has no live row for is never quoted;
- while the config is paused, every build answers
503; - per-venue limits the deploy’s admin sets (for example a slippage cap) apply on chain, inside the slippage you ask for.
Authentication
https://router.raze.bot takes no key. A router you run yourself has no keys, no accounts and no rate limit, and listens on loopback (127.0.0.1:4700) by default: keep it behind your firewall or your own gateway, which is the place for keys and limits.
Routes
Conventions
- Amounts are integers in the token’s base units (lamports for SOL, the mint’s smallest unit otherwise). In quotes and builds the large amounts are decimal strings (
inAmount,outAmount,otherAmountThreshold, everycostsfield). - Mints and wallets are base58 addresses. Wrapped SOL is
So11111111111111111111111111111111111111112. - Venue labels (
label,dexes,excludeDexes) are thedexnames ofGET /venues, matched ignoring case and punctuation. - Unknown parameters and body fields are ignored, not refused.
- Every transaction is v1 (SIMD-0385): see Transactions.
Close to Jupiter, not the same
Quote parameters and response fields follow Jupiter’s quote API (inputMint, outputMint, amount, swapMode, slippageBps, routePlan, otherAmountThreshold, …), and the build answers with the same instruction buckets. A Jupiter client ports with a few changes: