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

# book.(instrument_name).(interval) 

> Real-time order book updates for a specific instrument.

- The first notification contains a full snapshot of the book (bids and asks for **all price levels** — no depth limit).
- Subsequent notifications contain only incremental changes to individual price levels.
- Updates are tuples in the form `[action, price, amount]`, where `action` is one of: `new`, `change`, `delete`.

Each notification includes a `change_id`. Every message except the first also contains `prev_change_id`. If `prev_change_id` equals the `change_id` of the previous message, it indicates that no messages were missed.

For Starbase-routed instruments, the published price levels include accepted mass-quote liquidity.

**Depth:** This channel delivers the complete order book with no depth restriction. If you need a depth-limited, price-grouped snapshot, use `book.{instrument_name}.{group}.{depth}.{interval}` instead.

**Units:** For perpetuals and futures, `amount` is in USD units. For options, `amount` is in the corresponding cryptocurrency contracts (e.g., BTC or ETH).




## AsyncAPI

````yaml api-reference/coinbase-deribit-app-api/adv-starbase-asyncapi.json book.(instrument_name).(interval)
id: book.(instrument_name).(interval)
title: 'book.(instrument_name).(interval) '
description: >
  Real-time order book updates for a specific instrument.


  - The first notification contains a full snapshot of the book (bids and asks
  for **all price levels** — no depth limit).

  - Subsequent notifications contain only incremental changes to individual
  price levels.

  - Updates are tuples in the form `[action, price, amount]`, where `action` is
  one of: `new`, `change`, `delete`.


  Each notification includes a `change_id`. Every message except the first also
  contains `prev_change_id`. If `prev_change_id` equals the `change_id` of the
  previous message, it indicates that no messages were missed.


  For Starbase-routed instruments, the published price levels include accepted
  mass-quote liquidity.


  **Depth:** This channel delivers the complete order book with no depth
  restriction. If you need a depth-limited, price-grouped snapshot, use
  `book.{instrument_name}.{group}.{depth}.{interval}` instead.


  **Units:** For perpetuals and futures, `amount` is in USD units. For options,
  `amount` is in the corresponding cryptocurrency contracts (e.g., BTC or ETH).
servers:
  - id: public
    protocol: wss
    host: streams.drb.coinbase.com/ws/api/v2
    bindings: []
    variables: []
address: book.{instrument_name}.{interval}
parameters:
  - id: instrument_name
    jsonSchema:
      type: string
      description: The name of the instrument
    description: The name of the instrument
    type: string
    required: true
    deprecated: false
  - id: interval
    jsonSchema:
      type: string
      description: >-
        Frequency of notifications. Events will be aggregated over this
        interval. The value `raw` selects the finest granularity - events are
        aggregated over a 1 millisecond interval **(Please note that `raw`
        interval is only available to authorized users)**


        **Allowed values:** `raw`, `100ms`, `agg2`
      enum:
        - 100ms
        - agg2
        - raw
    description: >-
      Frequency of notifications. Events will be aggregated over this interval.
      The value `raw` selects the finest granularity - events are aggregated
      over a 1 millisecond interval **(Please note that `raw` interval is only
      available to authorized users)**


      **Allowed values:** `raw`, `100ms`, `agg2`
    type: string
    required: true
    deprecated: false
bindings: []
operations:
  - &ref_1
    id: receive_book_instrument_name_interval_updates
    title: Receive order book updates
    description: Client receives order book update notifications
    type: receive
    messages:
      - &ref_3
        id: subscribe_request
        contentType: application/json
        payload:
          - name: Subscription Request
            description: >-
              Client sends subscription request to subscribe to notification
              channel. Please refer to [Notification
              page](https://deribit.mintlify.app/articles/notifications) for
              more information.
            type: object
            properties:
              - name: id
                type: integer
                description: Client request id, echoed in the response.
                required: true
              - name: jsonrpc
                type: string
                description: JSON-RPC version. Always `2.0`.
                required: true
              - name: method
                type: string
                description: '`public/subscribe` on the public WebSocket.'
                enumValues:
                  - public/subscribe
                required: true
              - name: params
                type: object
                required: true
                properties:
                  - name: channels
                    type: array
                    description: >-
                      Stream names to subscribe to, for example
                      `quote.BTC-PERPETUAL`.
                    required: true
                    properties:
                      - name: item
                        type: string
                        required: false
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          properties:
            id:
              default: 42
              description: Client request id, echoed in the response.
              type: integer
              x-parser-schema-id: <anonymous-schema-43>
            jsonrpc:
              default: '2.0'
              description: JSON-RPC version. Always `2.0`.
              type: string
              x-parser-schema-id: <anonymous-schema-44>
            method:
              default: public/subscribe
              description: '`public/subscribe` on the public WebSocket.'
              enum:
                - public/subscribe
              type: string
              x-parser-schema-id: <anonymous-schema-45>
            params:
              additionalProperties: false
              properties:
                channels:
                  default:
                    - book.BTC-PERPETUAL.100ms
                  description: >-
                    Stream names to subscribe to, for example
                    `quote.BTC-PERPETUAL`.
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-48>
                  type: array
                  x-parser-schema-id: <anonymous-schema-47>
              required:
                - channels
              type: object
              x-parser-schema-id: <anonymous-schema-46>
          required:
            - id
            - jsonrpc
            - method
            - params
          type: object
          x-parser-schema-id: <anonymous-schema-42>
        title: Subscription Request
        description: >-
          Client sends subscription request to subscribe to notification
          channel. Please refer to [Notification
          page](https://deribit.mintlify.app/articles/notifications) for more
          information.
        example: |-
          {
            "id": 42,
            "jsonrpc": "2.0",
            "method": "public/subscribe",
            "params": {
              "channels": [
                "book.BTC-PERPETUAL.100ms"
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe_request
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: book.(instrument_name).(interval)
  - &ref_2
    id: send_subscribe_book_instrument_name_interval
    title: Send subscribe request for order book
    description: Client sends subscription request for order book updates
    type: send
    messages:
      - &ref_4
        id: subscription_message
        contentType: application/json
        payload:
          - name: Subscription Notification Data
            description: Server sends subscription notification data
            type: object
            properties:
              - name: data
                type: object
                required: true
                properties:
                  - name: asks
                    type: array
                    required: true
                  - name: bids
                    type: array
                    required: true
                  - name: change_id
                    type: integer
                    description: Identifier of the notification
                    required: true
                  - name: instrument_name
                    type: string
                    description: Unique instrument identifier
                    required: true
                  - name: prev_change_id
                    type: integer
                    description: >-
                      Identifier of the previous notification (it's **not**
                      included for the first notification)
                    required: false
                  - name: timestamp
                    type: integer
                    description: >-
                      The timestamp of last change (milliseconds since the Unix
                      epoch)
                    required: false
                  - name: type
                    type: string
                    description: >-
                      Type of notification: `snapshot` for initial, `change` for
                      others
                    enumValues:
                      - change
                      - snapshot
                    required: false
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          description: Response containing notification data
          properties:
            data:
              additionalProperties: false
              properties:
                asks:
                  description: ''
                  type: array
                  x-parser-schema-id: <anonymous-schema-51>
                bids:
                  description: ''
                  type: array
                  x-parser-schema-id: <anonymous-schema-52>
                change_id:
                  description: Identifier of the notification
                  type: integer
                  x-parser-schema-id: <anonymous-schema-53>
                instrument_name:
                  description: Unique instrument identifier
                  example: BTC-PERPETUAL
                  type: string
                  x-parser-schema-id: <anonymous-schema-54>
                prev_change_id:
                  description: >-
                    Identifier of the previous notification (it's **not**
                    included for the first notification)
                  type: integer
                  x-parser-schema-id: <anonymous-schema-55>
                timestamp:
                  description: >-
                    The timestamp of last change (milliseconds since the Unix
                    epoch)
                  example: 1536569522277
                  type: integer
                  x-parser-schema-id: <anonymous-schema-56>
                type:
                  description: >-
                    Type of notification: `snapshot` for initial, `change` for
                    others
                  enum:
                    - change
                    - snapshot
                  type: string
                  x-parser-schema-id: <anonymous-schema-57>
              required:
                - asks
                - bids
                - change_id
                - instrument_name
              type: object
              x-parser-schema-id: <anonymous-schema-50>
          required:
            - data
          type: object
          x-parser-schema-id: <anonymous-schema-49>
        title: Subscription Notification Data
        description: Server sends subscription notification data
        example: |-
          {
            "data": {
              "asks": [
                [
                  "new",
                  5042.64,
                  40
                ],
                [
                  "new",
                  5043.3,
                  40
                ]
              ],
              "bids": [
                [
                  "new",
                  5042.34,
                  30
                ],
                [
                  "new",
                  5041.94,
                  20
                ]
              ],
              "change_id": 297217,
              "instrument_name": "BTC-PERPETUAL",
              "timestamp": 1554373962454,
              "type": "snapshot"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscription_message
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
receiveMessages:
  - *ref_4
extensions:
  - id: x-parser-unique-object-id
    value: book.(instrument_name).(interval)
securitySchemes: []

````