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

# Get orderbook depth

> Returns global orderbook depth for a market symbol. The gateway serves a hot cache first and falls back to a snapshot table when the cache is cold.



## OpenAPI

````yaml /openapi.json get /api/v2/markets/orderbook/{market}
openapi: 3.1.0
info:
  title: QuantDesk API
  version: 2.0.0
  description: >-
    Public HTTP API for the QuantDesk perpetual DEX gateway. Endpoints are
    grouped by market data, unified portfolio state, oracle pricing, social
    surfaces, backtesting, and reference data. Field-level truth for on-chain
    accounts lives in the SDK; this reference documents the REST gateway
    surface.


    Authenticated routes accept a Bearer JWT obtained from the wallet session
    flow described in the Authentication guide.
  contact:
    name: QuantDesk Support
    url: https://docs.quantdesk.app
    email: support@quantdesk.app
  license:
    name: MIT
servers:
  - url: https://api.quantdesk.app
    description: Production gateway
security: []
tags:
  - name: Markets
    description: Market registry, metadata, and crankless orderbook depth.
  - name: Oracle
    description: Price feeds sourced from the Pyth oracle network.
  - name: Portfolio
    description: Unified portfolio state aggregated from on-chain accounts.
  - name: Data
    description: Authoritative market statistics and historical OHLCV candles.
  - name: Social
    description: Leaderboard and verified proof (flex) cards.
  - name: Backtesting
    description: Strategy simulation lifecycle and dataset catalog.
  - name: Referrals
    description: Referral validation before on-chain assignment.
paths:
  /api/v2/markets/orderbook/{market}:
    get:
      tags:
        - Markets
      summary: Get orderbook depth
      description: >-
        Returns global orderbook depth for a market symbol. The gateway serves a
        hot cache first and falls back to a snapshot table when the cache is
        cold.
      operationId: getOrderbook
      parameters:
        - name: market
          in: path
          required: true
          description: Market symbol, e.g. `SOL-PERP`.
          schema:
            type: string
            example: SOL-PERP
      responses:
        '200':
          description: Orderbook depth
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  source:
                    type: string
                    description: >-
                      Whether depth came from the hot cache or a fallback
                      snapshot.
                    enum:
                      - cache
                      - snapshot
                    example: cache
                  data:
                    type: object
                    properties:
                      bids:
                        type: array
                        items:
                          $ref: '#/components/schemas/OrderbookLevel'
                      asks:
                        type: array
                        items:
                          $ref: '#/components/schemas/OrderbookLevel'
components:
  schemas:
    OrderbookLevel:
      type: object
      properties:
        price:
          type: number
          example: 168.4
        size:
          type: number
          example: 125.5

````