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

# Get top-10 order book snapshot

> Returns the current top-10 bid and ask levels for the given trading pair.

      **Ordering — standard exchange layout**
      Both `bids` and `offers` are ordered **highest price first**.

      - `bids[0]` is the **best bid** (highest buy, closest to spread).
      - `offers[offers.length - 1]` is the **best ask** (lowest sell, closest to spread).

      Renders directly into two stacked tables: iterate each array top-to-bottom,
      put the asks (`offers`) above the bids, and the spread row sits between
      `offers[last]` and `bids[0]`.

      **Totals**
      `totals.bidTotalVolume` / `askTotalVolume` are cumulative notional values
      (sum of `price × amount` across the visible side) — use them as the
      denominator for depth-bar widths.



## OpenAPI

````yaml /api-reference/openapi.json get /order_book/{coin_pair}
openapi: 3.0.0
info:
  title: Xenios Trading API
  description: >-
    Place and manage orders, stream live market and account data, and read
    wallets, deposits and reference data over one authenticated gateway. All
    protected endpoints are authenticated with an HMAC-SHA256 request signature
    (see the Authentication guide). Decimal amounts are strings; timestamps are
    ISO-8601. Successful responses are wrapped in a standard { statusCode,
    success, message, data } envelope.
  version: '1.0'
  contact: {}
servers:
  - url: https://<your-host>/api/v1/trading
    description: Development gateway. Prefix every trading path with this base URL.
security:
  - xenios-hmac: []
tags:
  - name: Orders
    description: >-
      Place, cancel, and read your orders. Placement is idempotent on
      client_order_id.
  - name: Order Book
    description: Top-of-book depth snapshots for a trading pair.
  - name: Products
    description: Tradable products and pairs, plus OHLCV candles for charting.
  - name: Assets
    description: The assets available to your account.
  - name: Wallets
    description: Generate deposit addresses and read deposit history.
  - name: Account
    description: Your trading fee and effective account settings.
  - name: Health
    description: Liveness and readiness probes.
paths:
  /order_book/{coin_pair}:
    get:
      tags:
        - Order Book
      summary: Get top-10 order book snapshot
      description: >-
        Returns the current top-10 bid and ask levels for the given trading
        pair.

              **Ordering — standard exchange layout**
              Both `bids` and `offers` are ordered **highest price first**.

              - `bids[0]` is the **best bid** (highest buy, closest to spread).
              - `offers[offers.length - 1]` is the **best ask** (lowest sell, closest to spread).

              Renders directly into two stacked tables: iterate each array top-to-bottom,
              put the asks (`offers`) above the bids, and the spread row sits between
              `offers[last]` and `bids[0]`.

              **Totals**
              `totals.bidTotalVolume` / `askTotalVolume` are cumulative notional values
              (sum of `price × amount` across the visible side) — use them as the
              denominator for depth-bar widths.
      operationId: getOrderBookSnapshot
      parameters:
        - name: coin_pair
          required: true
          in: path
          description: Trading pair id (e.g. `BTC-USD`).
          schema:
            example: BTC-USD
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - properties:
                      data:
                        $ref: '#/components/schemas/OrderBookSnapshotDto'
components:
  schemas:
    ApiResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code echoed in the body.
          example: 200
        success:
          type: boolean
          description: True for success responses.
          example: true
        message:
          type: string
          description: Human-readable status message.
          example: Request processed successfully
      required:
        - statusCode
        - success
    OrderBookSnapshotDto:
      type: object
      properties:
        bids:
          description: >-
            Bid side — **highest price first**. `bids[0]` is the best bid
            (closest to the spread). Iterate top-to-bottom to render the bid
            table below the spread row.
          example:
            - price: '67432.18'
              amount: 0.4231
              total: 28530.85
            - price: '67430.05'
              amount: 1.0124
              total: 68281.41
            - price: '67428.40'
              amount: 0.0875
              total: 5900
          type: array
          items:
            $ref: '#/components/schemas/OrderBookLevelDto'
        offers:
          description: >-
            Ask side — **highest price first** (so the array iterates
            top-to-bottom in the standard exchange layout). The **best ask**
            sits at `offers[offers.length - 1]`, immediately above the spread
            row.
          example:
            - price: '67445.00'
              amount: 1.5
              total: 101167.5
            - price: '67441.10'
              amount: 0.7551
              total: 50931.83
            - price: '67438.92'
              amount: 0.2104
              total: 14193.15
          type: array
          items:
            $ref: '#/components/schemas/OrderBookLevelDto'
        totals:
          description: Cumulative notional resting on each side of the book.
          allOf:
            - $ref: '#/components/schemas/OrderBookTotalsDto'
        spread:
          type: number
          description: Absolute spread between best bid and best ask (quote ccy).
          example: 6.74
        spreadPercent:
          type: number
          description: Spread as a percentage of the best ask.
          example: 0.01
        ticker:
          type: object
          description: Latest known ticker snapshot for this pair.
          example:
            price: '67435.55'
            time: '2026-05-15T12:47:56.460Z'
          nullable: true
      required:
        - bids
        - offers
        - totals
        - spread
        - spreadPercent
    OrderBookLevelDto:
      type: object
      properties:
        price:
          type: string
          description: Limit price for this level (in quote currency).
          example: '67432.18'
        amount:
          type: number
          description: Aggregated quantity available at this price.
          example: 0.4231
        total:
          type: number
          description: Notional total (price × amount).
          example: 28530.85
      required:
        - price
        - amount
        - total
    OrderBookTotalsDto:
      type: object
      properties:
        bidTotalVolume:
          type: number
          description: >-
            Sum of (price × amount) across every visible bid level — i.e. the
            cumulative notional resting on the bid side.
          example: 132584.21
        askTotalVolume:
          type: number
          description: >-
            Sum of (price × amount) across every visible ask level — cumulative
            notional resting on the ask side.
          example: 141092.07
      required:
        - bidTotalVolume
        - askTotalVolume
  securitySchemes:
    xenios-hmac:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        HMAC-SHA256 authentication. Sign every request and send X-API-KEY,
        X-API-SIGNATURE, X-API-TIMESTAMP and X-API-NONCE (see the Authentication
        guide). Each route also requires a specific claim on your API key (e.g.
        read:orders, write:orders, read:account, read:market-data).

````