> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.drazill.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.drazill.com/_mcp/server.

# orderbook

GET /orderbook:{outcome_id}

Full order-book depth (bids & asks) for an outcome.

Reference: https://docs.drazill.com/realtime/reference/orderbook/orderbook

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: orderbook
  version: subpackage_orderbook.orderbook
  description: Full order-book depth (bids & asks) for an outcome.
channels:
  /orderbook:{outcome_id}:
    description: Full order-book depth (bids & asks) for an outcome.
    subscribe:
      operationId: subpackage_orderbook.orderbook-subscribe
      summary: receive_orderbook
      message:
        name: receive_orderbook
        title: receive_orderbook
        payload:
          $ref: '#/components/schemas/orderbook_orderbook_update'
servers:
  production:
    url: wss://api.drazill.com/
    protocol: wss
    x-default: true
  staging:
    url: wss://staging.drazill.com/
    protocol: wss
components:
  schemas:
    OrderbookUpdateDataBidsItems:
      type: object
      properties:
        price:
          type: string
          description: Price as a decimal string in [0.01, 0.99].
        quantity:
          type: string
          description: Resting size at this level (decimal string).
        order_count:
          type: integer
          description: Number of orders resting at this level.
      required:
        - price
        - quantity
        - order_count
      title: OrderbookUpdateDataBidsItems
    OrderbookUpdateDataAsksItems:
      type: object
      properties:
        price:
          type: string
          description: Price as a decimal string in [0.01, 0.99].
        quantity:
          type: string
          description: Resting size at this level (decimal string).
        order_count:
          type: integer
          description: Number of orders resting at this level.
      required:
        - price
        - quantity
        - order_count
      title: OrderbookUpdateDataAsksItems
    OrderbookUpdateData:
      type: object
      properties:
        outcome_id:
          type: string
          format: uuid
        bids:
          type: array
          items:
            $ref: '#/components/schemas/OrderbookUpdateDataBidsItems'
        asks:
          type: array
          items:
            $ref: '#/components/schemas/OrderbookUpdateDataAsksItems'
        spread:
          type:
            - string
            - 'null'
          description: Best-bid/ask spread (decimal string).
        mid_price:
          type:
            - string
            - 'null'
          description: Mid price (decimal string).
      required:
        - outcome_id
        - bids
        - asks
      title: OrderbookUpdateData
    orderbook_orderbook_update:
      type: object
      properties:
        type:
          type: string
          enum:
            - orderbook_update
        channel:
          type: string
          description: The concrete channel this frame belongs to.
        data:
          $ref: '#/components/schemas/OrderbookUpdateData'
        ts:
          type: number
          format: double
          description: Publish time (epoch seconds, float).
        sequence:
          type:
            - integer
            - 'null'
          description: >-
            Per-channel monotonic sequence (Redis INCR); null if sequencing was
            unavailable.
        correlation_id:
          type:
            - string
            - 'null'
      required:
        - type
        - channel
        - data
        - ts
        - sequence
      title: orderbook_orderbook_update

```