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

# Get orderbook

> Handles `GET /v1/view/orderbook/{symbol}` via `get.v1.view.orderbook.by_symbol`.



## OpenAPI

````yaml /openapi/phoenix-public-api.json get /v1/view/orderbook/{symbol}
openapi: 3.1.0
info:
  title: Phoenix Eternal API
  description: >-
    RESTful API for accessing Phoenix Eternal perpetual trading data. Provides
    real-time orderbook levels, asset information, and market metadata.
  termsOfService: https://www.phoenix.trade/terms-of-service
  contact:
    name: Phoenix Development Team
    url: https://github.com/Ellipsis-Labs/phoenix
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://perp-api.phoenix.trade
    description: Phoenix Eternal Perp API
security: []
tags:
  - name: Auth
    description: Wallet and session authentication.
  - name: Exchange
    description: Exchange, market, candle, and no-referral register-instruction workflows.
  - name: Invite
    description: Invite validation, referral activation, and wallet allowlist checks.
  - name: Notifications
    description: Trader notification reads and acknowledgement helpers.
  - name: Trader
    description: Trader state, account history, and transaction builders.
externalDocs:
  url: https://docs.phoenix.trade
  description: Phoenix developer documentation
paths:
  /v1/view/orderbook/{symbol}:
    get:
      tags:
        - Exchange
      summary: Get orderbook
      description: >-
        Handles `GET /v1/view/orderbook/{symbol}` via
        `get.v1.view.orderbook.by_symbol`.
      operationId: get.v1.view.orderbook.by_symbol
      parameters:
        - name: symbol
          in: path
          description: Trading symbol (BTC, ETH, SOL)
          required: true
          schema:
            type: string
        - name: include_splines
          in: query
          description: >-
            Whether to include splines in response and use them for parsed
            orderbook
          required: false
          schema:
            type: boolean
        - name: bypass_execution_band
          in: query
          description: >-
            Opt in to receive the full orderbook during commodities after-hours
            (no-op otherwise)
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Phoenix Eternal orderbook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderbookView'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
      security:
        - PhoenixBearerAuth: []
components:
  schemas:
    OrderbookView:
      type: object
      description: View orderbook
      required:
        - slot
        - symbol
        - bids
        - asks
      properties:
        asks:
          type: array
          items:
            type: array
            items: false
            prefixItems:
              - type: number
                format: double
              - type: number
                format: double
          description: Ask levels as `(price, size)`.
        bids:
          type: array
          items:
            type: array
            items: false
            prefixItems:
              - type: number
                format: double
              - type: number
                format: double
          description: Bid levels as `(price, size)`.
        mid:
          type:
            - number
            - 'null'
          format: double
          description: Mid price, if both sides exist.
        slot:
          type: integer
          format: int64
          description: Solana slot of this orderbook snapshot.
          minimum: 0
        splines:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Spline'
          description: Optional spline levels.
        symbol:
          type: string
          description: Market symbol.
    Spline:
      type: object
      required:
        - traderKey
        - midPrice
        - bidFilledAmount
        - askFilledAmount
        - bidRegions
        - askRegions
      properties:
        askFilledAmount:
          type: string
        askRegions:
          type: array
          items:
            $ref: '#/components/schemas/TickRegion'
        bidFilledAmount:
          type: string
        bidRegions:
          type: array
          items:
            $ref: '#/components/schemas/TickRegion'
        midPrice:
          type: number
          format: double
        traderKey:
          type: string
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    TickRegion:
      type: object
      required:
        - start
        - end
        - density
        - totalSize
        - filledSize
      properties:
        density:
          type: number
          format: double
        end:
          type: number
          format: double
        filledSize:
          type: string
        start:
          type: number
          format: double
        totalSize:
          type: string
  responses:
    ErrorResponse:
      description: Standard JSON error payload.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    PhoenixBearerAuth:
      type: http
      scheme: bearer
      description: Bearer access token issued by `/v1/auth/*` login endpoints.

````