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

# Get order book depth snapshot

> Returns the most recent snapshot along with the WAL `sequence` it reflects. Websocket clients use this endpoint to resync after detecting a sequence gap in the `market-{symbol}` delta stream.




## OpenAPI

````yaml /xentfi-pro/openapi.json get /v1/orderbook/markets/{marketSymbol}/book
openapi: 3.0.3
info:
  title: XentFi Pro API
  version: 1.0.0
  description: >-
    API documentation for XentFi Pro — programmatic liquidity and trading on
    XentFi's hybrid off-chain matching / on-chain settlement order book.
    Requires a Pro account and an API key with the Trade scope. See the XentFi
    Pro Overview and Authentication guides in this tab before making requests.
  contact:
    name: XentFi Pro Support
    email: support@xentfi.com
servers:
  - url: https://api.pro.xentfi.com
    description: XentFi Pro production server
security: []
tags:
  - name: OrderBook
    description: Place, list, cancel, and inspect orders and their fills.
  - name: OrderBook Markets
    description: Market configuration, order book depth, trades, ticker, and candles.
  - name: OrderBook Settlement
    description: Inspect on-chain settlement batches produced from matched trades.
  - name: OrderBook Ops
    description: Engine health/status and realtime (websocket) channel authorization.
paths:
  /v1/orderbook/markets/{marketSymbol}/book:
    get:
      tags:
        - OrderBook Markets
      summary: Get order book depth snapshot
      description: >
        Returns the most recent snapshot along with the WAL `sequence` it
        reflects. Websocket clients use this endpoint to resync after detecting
        a sequence gap in the `market-{symbol}` delta stream.
      operationId: getOrderBook
      parameters:
        - name: marketSymbol
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 50
      responses:
        '200':
          description: Order book snapshot
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/OrderBookSnapshot'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Market not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
          OrgIdAuth: []
components:
  schemas:
    OrderBookSnapshot:
      type: object
      properties:
        marketSymbol:
          type: string
        sequence:
          type: integer
          description: >-
            WAL sequence this snapshot reflects — used by websocket clients to
            resync after a detected gap.
        bids:
          type: array
          items:
            $ref: '#/components/schemas/OrderBookLevel'
        asks:
          type: array
          items:
            $ref: '#/components/schemas/OrderBookLevel'
        timestamp:
          type: integer
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: NOT_FOUND
            message:
              type: string
              example: Wallet not found
            timestamp:
              type: string
              format: date-time
            requestId:
              type: string
    OrderBookLevel:
      type: object
      properties:
        price:
          type: string
        quantity:
          type: string
        orderCount:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apiKey
    OrgIdAuth:
      type: apiKey
      in: header
      name: orgId

````