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

# Readiness

> `200` when the router can serve quotes and builds, `503` with **every** reason when it
cannot. While it is `503`, `/quote` and `/swap` answer `503 not_ready` with the same
reasons.

A green answer can still carry information: `warming` (after a restart or a stream gap,
quotes on pools not yet re-read decline `stale` for a few minutes), `red_pass` (venues the
price oracle holds out of every route), `probation` (venues let back in on trial) and
`warnings` (problems that do not close the gate). The reasons are human-readable sentences,
some in Italian: show them, do not parse them.


Point your load balancer here. How to read the answer: [Errors and readiness](/router/errors#ready).


## OpenAPI

````yaml router.openapi.yaml GET /ready
openapi: 3.1.0
info:
  title: Raze Swap Router API
  version: 1.0.0
  description: >
    Quotes and **unsigned** transactions for swaps on Solana, routed over ~20
    venues through a

    deploy of the `swap` program. The router **never signs and never sends**:
    you get a

    quote, then the instructions (or a serialized, unsigned transaction), and
    you sign and

    broadcast from your backend.


    **Public router.** `https://router.raze.bot` is Raze's router: it takes no
    key and builds for

    Raze's deploy of the `swap` program,
    `DADMMjfNnY6z8H9h9RfHZ9tfarBySsj4Yb65qLyKJDAD`.


    **One router, one `swap` deploy.** A router builds for the program address
    in its

    `ROUTER_SWAP_PROGRAM_ID` (the `programId` of every `swapInstruction` is that
    address) and

    reads that deploy's on-chain config: a venue the config has no live row for
    is never served,

    and while the config is paused every build answers `503`.


    **No authentication.** A router you run yourself has no keys, no accounts
    and no rate limit. It

    listens on loopback by default (`ROUTER_LISTEN=127.0.0.1:4700`); keep it
    behind your firewall or

    your own gateway.


    **Conventions:**

    - Amounts are integers in the token's base units (lamports, atoms). In
    quotes and builds the
      u64 amounts are decimal **strings** (`inAmount`, `outAmount`, `otherAmountThreshold`,
      `platformFee.amount`, every `costs.*`). `minReturn`, `maxAmountIn`, `computeUnits` and
      `contextSlot` are JSON numbers.
    - Mints and wallets are base58 addresses; wrapped SOL is
    `So11111111111111111111111111111111111111112`.

    - Venue labels (`label`, `dexes`, `excludeDexes`) are the `dex` names of
    `GET /venues`; input
      labels match case- and punctuation-insensitively, aliases included.
    - Request bodies are read as JSON whatever the `Content-Type`; at most 256
    KiB (larger is `413`).

    - Unknown fields and query parameters are ignored, not rejected.


    **Transactions are v1** (SIMD-0385, prefix `0x81`, up to 4,096 bytes and 64
    account keys, no

    address lookup tables). The compute-unit limit, loaded-accounts limit and
    priority fee travel in

    the message header (`transactionConfig`), not as ComputeBudget instructions.
    Signing a v1

    transaction needs an SDK that supports it. `txVersion: 0` and
    `asLegacyTransaction: true` are

    refused.


    **Errors** are `{"error", "reason", "quoteId"}`: `error` is a closed code,
    `reason` a label or a

    sentence, `quoteId` present once the request was parsed. The status says
    whose move it is:

    `400` fix the request, `404` no route exists, `409` re-quote or retry later,
    `413` too large,

    `422` a named decline that waiting will not change, `500` a router bug,
    `503` not ready: retry

    with backoff. Two bodies differ: `not_ready` carries `reasons` (a list)
    instead of `reason`, and

    a `low_liquidity` decline adds `liquidity`.


    The quote and swap fields mirror Jupiter's Swap API (Metis), so most clients
    change only the

    host; differences are listed on each operation.
servers:
  - url: https://router.raze.bot
    description: Raze's public router
  - url: http://127.0.0.1:4700
    description: Your own router (default ROUTER_LISTEN)
security: []
tags:
  - name: ops
    description: Liveness and readiness
  - name: venues
    description: The venues this router knows, and the price oracle's verdict on each
  - name: swap
    description: Quote, then build the instructions or the unsigned transaction
  - name: transactions
    description: Serialize your own instructions as an unsigned v1 transaction
paths:
  /ready:
    get:
      tags:
        - ops
      summary: Readiness
      description: >
        `200` when the router can serve quotes and builds, `503` with **every**
        reason when it

        cannot. While it is `503`, `/quote` and `/swap` answer `503 not_ready`
        with the same

        reasons.


        A green answer can still carry information: `warming` (after a restart
        or a stream gap,

        quotes on pools not yet re-read decline `stale` for a few minutes),
        `red_pass` (venues the

        price oracle holds out of every route), `probation` (venues let back in
        on trial) and

        `warnings` (problems that do not close the gate). The reasons are
        human-readable sentences,

        some in Italian: show them, do not parse them.
      operationId: getReady
      responses:
        '200':
          description: Ready
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ready'
              example:
                ready: true
                reasons: []
        '503':
          description: Not ready; the same body with `ready` false and the reasons
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ready'
              examples:
                cold:
                  summary: >-
                    A router that has just started (reasons from the router's
                    tests)
                  value:
                    ready: false
                    reasons:
                      - 'store cold: no account frame from the stream yet'
                      - index not built
components:
  schemas:
    Ready:
      type: object
      required:
        - ready
        - reasons
      properties:
        ready:
          type: boolean
        reasons:
          type: array
          items:
            type: string
          description: Empty when ready; otherwise every reason, as sentences
        warming:
          type: object
          description: >-
            Present only while pool state is being re-read after a restart or
            stream gap: quotes on pools not yet re-read decline `stale`
          properties:
            reread_done_to:
              type: integer
              description: Slot the re-read has reached
            covered_since:
              type: integer
              description: Slot it must reach
        red_pass:
          type: array
          items:
            type: string
          description: >-
            Venues the price oracle holds out of every route, with the bar they
            broke. Absent when none
        probation:
          type: array
          items:
            type: string
          description: Venues let back on routes on trial. Absent when none
        warnings:
          type: array
          items:
            type: string
          description: Problems that do not close the gate. Absent when none

````

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