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

# Perp market orderbook

> Aggregated orderbook for a perp market. The shape depends on the venue:
- **Phoenix** — a real orderbook with `bids`/`asks` levels.
- **Jupiter (LP-vault)** — Jupiter has no CLOB, so `bids`/`asks` are empty
  and a `note` explains that pricing comes from the LP vault; use
  `/orders` for trigger orders.




## OpenAPI

````yaml openapi-spec/history.yaml get /api/sol/perp/markets/{market_id}/orderbook
openapi: 3.0.3
info:
  title: Raze Database API
  description: >
    Paid subscription API for Solana transaction data and history.


    ## Batch Requests

    All endpoints with path parameters (mint, signer, address, tokenMint,
    ownerAddress) support batch queries

    via comma-separated values. For example:
    `/api/sol/trades/mint/mint1,mint2,mint3?limit=50`


    - Maximum 10 values per batch request

    - Each value must be a valid address (>= 32 characters)

    - Single values behave identically to non-batch requests

    - Batch response format: `{ "success": true, "results": { "value1": {...},
    "value2": {...} }, "count": N, "timestamp": "..." }`

    - Each key in `results` contains the full single-entity response

    - Queries run in parallel for maximum performance
  version: 1.0.0
servers:
  - url: https://api.raze.bot
    description: >-
      Raze global History API — GeoDNS routes to the nearest region
      automatically
security:
  - ApiKeyAuth: []
paths:
  /api/sol/perp/markets/{market_id}/orderbook:
    get:
      summary: Perp market orderbook
      description: >
        Aggregated orderbook for a perp market. The shape depends on the venue:

        - **Phoenix** — a real orderbook with `bids`/`asks` levels.

        - **Jupiter (LP-vault)** — Jupiter has no CLOB, so `bids`/`asks` are
        empty
          and a `note` explains that pricing comes from the LP vault; use
          `/orders` for trigger orders.
      operationId: getPerpMarketOrderbook
      parameters:
        - name: market_id
          in: path
          required: true
          schema:
            type: string
          example: phoenix:SOL-USDC
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerpOrderbookResponse'
components:
  schemas:
    PerpOrderbookResponse:
      type: object
      description: >
        Perp orderbook. Phoenix venues return populated `bids`/`asks`; Jupiter

        (LP-vault) venues return empty arrays with an explanatory `note`. On
        error,

        an `error`/`message` pair is returned with empty arrays.
      properties:
        market_id:
          type: string
        venue:
          type: string
          description: Present for the orderbook (phoenix) shape.
        slot:
          type: integer
          format: int64
          description: Present for the orderbook (phoenix) shape.
        bids:
          type: array
          items:
            $ref: '#/components/schemas/PerpOrderbookLevel'
        asks:
          type: array
          items:
            $ref: '#/components/schemas/PerpOrderbookLevel'
        note:
          type: string
          description: >-
            Present for the LP-vault (jup) shape — explains that pricing comes
            from the LP vault; use `/orders` for triggers.
        error:
          type: boolean
          description: Present on error responses.
        message:
          type: string
          description: Present on error responses.
    PerpOrderbookLevel:
      type: object
      properties:
        price_e6:
          type: integer
          format: int64
          description: Price in USD micros (1e6 = $1).
        size_usd:
          type: number
          description: Level size in RAW USD (not e6).
        orders:
          type: integer
          description: Number of orders at this level (Phoenix is always 1 per level).
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: apiKey

````