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

# Get Order Book

> This endpoint retrieves the latest order book snapshot for a given market, including a snapshot timestamp.



## OpenAPI

````yaml GET /api/v1/order-book
openapi: 3.1.0
info:
  title: Market Data API
  version: 1.0.0
servers:
  - url: https://market-data.sandbox.rails.xyz
security: []
paths:
  /api/v1/order-book:
    get:
      summary: Retrieve order book snapshot for the given market
      operationId: getOrderBook
      parameters:
        - name: market
          in: query
          description: >-
            Market name. Example value: `ETH-USDT`. To get all supported
            markets, call
            [/api/v1/markets](/latest/perps/rest-api/get-supported-markets)
            endpoint.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      type: object
                      properties:
                        quantity:
                          type: string
                          description: Total quantity at this price level.
                        price:
                          type: string
                          description: Price level.
                        orderType:
                          type: string
                          description: 'Side of the book: ''buy'' for bids, ''sell'' for asks.'
                          enum:
                            - buy
                            - sell
                      required:
                        - quantity
                        - price
                        - orderType
                  ts:
                    type: number
                    description: >-
                      Timestamp (milliseconds since epoch) when this snapshot
                      was generated.
                required:
                  - orders
                  - ts
              example:
                orders:
                  - quantity: '0.1'
                    price: '4355.1'
                    orderType: buy
                  - quantity: '0.2'
                    price: '4355.2'
                    orderType: sell
                ts: 1772576154169

````