> ## Documentation Index
> Fetch the complete documentation index at: https://docs.raze.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# Router overview

> Quotes and unsigned transactions for Solana swaps and perps, at router.raze.bot or through your own deploy of the swap program.

The router quotes swaps over about 20 Solana venues and builds the transaction that executes them through the on-chain `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.

<CardGroup cols={2}>
  <Card title="Quote and swap" icon="arrow-right-arrow-left" href="/router/quote-and-swap">
    The two calls of every swap
  </Card>

  <Card title="Transactions" icon="file-signature" href="/router/transactions">
    v1 transactions, compute budget, priority fee, tips
  </Card>

  <Card title="Platform fee" icon="percent" href="/router/fees">
    Charge your own fee on a swap
  </Card>

  <Card title="Perps" icon="chart-candlestick" href="/router/perps">
    Open, close and manage perp positions
  </Card>
</CardGroup>

## 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`.

```bash theme={null}
curl -s "https://router.raze.bot/quote?inputMint=So11111111111111111111111111111111111111112&outputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=100000000&slippageBps=50"
```

## One router, one program deploy

A router can also run for a client's own deploy of the `swap` 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

| Route | What |
| - | - |
| [`GET /quote`](/api-reference/router/quote), [`POST /quote`](/api-reference/router/quote-post) | Quote a swap: ExactIn or ExactOut, filters, split routes, platform fee |
| [`POST /swap-instructions`](/api-reference/router/swap-instructions) | Build the instructions for a quote, and the unsigned transaction if you ask for it |
| [`POST /swap`](/api-reference/router/swap) | The same handler as `/swap-instructions` |
| [`POST /tx/v1`](/api-reference/router/tx-v1) | Serialize your own instructions as an unsigned v1 transaction |
| [`GET /venues`](/api-reference/router/venues) | The venues this router knows, and which it can build and serve |
| [`GET /perp/markets`](/api-reference/perp/markets) | Live perp markets |
| [`POST /perp/quote`](/api-reference/perp/quote), [`POST /perp/instructions`](/api-reference/perp/instructions) | Quote and build perp operations |
| [`GET /perp/account`](/api-reference/perp/account) | A wallet's perp positions and orders |
| [`GET /health`](/api-reference/router/health), [`GET /ready`](/api-reference/router/ready) | Liveness and readiness |

## 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`, every `costs` field).
* Mints and wallets are base58 addresses. Wrapped SOL is `So11111111111111111111111111111111111111112`.
* Venue labels (`label`, `dexes`, `excludeDexes`) are the `dex` names of [`GET /venues`](/api-reference/router/venues), matched ignoring case and punctuation.
* Unknown parameters and body fields are ignored, not refused.
* Every transaction is **v1** (SIMD-0385): see [Transactions](/router/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:

| | Jupiter | This router |
| - | - | - |
| `/swap` | Always returns `swapTransaction` | Returns instructions; `swapTransaction` only with `serialize: true` |
| Transaction | v0, with lookup tables | v1, no lookup tables, compute budget in the message header |
| `destinationTokenAccount` | A token account | A **wallet**: the output goes to its associated token account |
| `feeAccount` | A token account of the referral program | A **wallet**; fees go through the `swap` program |
| Quote handle | Send the quote back | Send the quote back, or a signed `routeTicket` |
| Extras | — | `quoteId`, `allowSplit`, `feeOnInput`, `reserveKeys`, `costs`, `minReturn`, `maxAmountIn` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.