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

# Get orderbook



## OpenAPI

````yaml openapi/api-gateway.json GET /book
openapi: 3.1.0
info:
  title: ax-api-gateway
  description: ''
  license:
    name: ''
  version: 15.24.0
servers:
  - url: https://gateway.architect.exchange/api
security: []
tags:
  - name: api-gateway
    description: API gateway
paths:
  /book:
    get:
      tags:
        - api-gateway
      operationId: get_book
      parameters:
        - name: symbol
          in: query
          required: true
          schema:
            type: string
        - name: level
          in: query
          description: |-
            Orderbook depth level (2 or 3). Defaults to 2 if not specified.
            - 2: Returns aggregated quantity per price level
            - 3: Returns individual order quantities per price level
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int32
            minimum: 0
      responses:
        '200':
          description: >-
            Orderbook snapshot for a symbol. Level 3 includes individual order
            quantities; Level 2 returns only aggregated quantities.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBookResponse'
        '400':
          description: Invalid level parameter
        '404':
          description: Symbol not found
        '503':
          description: MdPub not available
      security:
        - session_token: []
components:
  schemas:
    GetBookResponse:
      type: object
      required:
        - book
      properties:
        book:
          $ref: '#/components/schemas/GetBookResponseBook'
    GetBookResponseBook:
      allOf:
        - $ref: '#/components/schemas/Timestamp'
        - type: object
          required:
            - s
            - b
            - a
          properties:
            a:
              type: array
              items:
                $ref: '#/components/schemas/GetBookResponseBookLevel'
            b:
              type: array
              items:
                $ref: '#/components/schemas/GetBookResponseBookLevel'
            s:
              type: string
    Timestamp:
      type: object
      required:
        - ts
        - tn
      properties:
        tn:
          type: integer
          format: int32
          minimum: 0
        ts:
          type: integer
          format: int32
    GetBookResponseBookLevel:
      type: object
      required:
        - p
        - q
      properties:
        o:
          type:
            - array
            - 'null'
          items:
            type: integer
            format: int64
            minimum: 0
        p:
          type: string
        q:
          type: integer
          format: int64
          minimum: 0
  securitySchemes:
    session_token:
      type: http
      scheme: bearer
      description: User session token

````