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

# Market depth

> Market order book depth with aggregated price levels. Optional aggregationLevel parameter (1, 2, 5, 10, 100, or 1000) can be appended to the topic, defaults to 1 if not specified.



## AsyncAPI

````yaml api-reference/asyncapi.json marketDepth
id: marketDepth
title: Market depth
description: >-
  Market order book depth with aggregated price levels. Optional
  aggregationLevel parameter (1, 2, 5, 10, 100, or 1000) can be appended to the
  topic, defaults to 1 if not specified.
servers:
  - id: testnet
    protocol: wss
    host: api.testnet.aptoslabs.com/decibel/ws
    bindings: []
    variables: []
address: depth:{marketAddr}:{aggregationLevel}
parameters:
  - id: marketAddr
    jsonSchema:
      type: string
      description: Market address (Aptos address format, e.g. 0x456...)
    description: Market address (Aptos address format, e.g. 0x456...)
    type: string
    required: true
    deprecated: false
bindings: []
operations:
  - &ref_1
    id: receivemarketDepth
    title: Receivemarket depth
    description: >-
      Receive updates for market order book depth with aggregated price levels.
      optional aggregationlevel parameter (1, 2, 5, 10, 100, or 1000) can be
      appended to the topic, defaults to 1 if not specified.
    type: receive
    messages:
      - &ref_2
        id: MarketDepthMessage
        payload:
          - name: MarketDepthMessage
            description: >-
              Market order book depth with aggregated price levels. Optional
              aggregationLevel parameter (1, 2, 5, 10, 100, or 1000) can be
              appended to the topic, defaults to 1 if not specified.
            type: object
            properties:
              - name: asks
                type: array
                required: true
              - name: bids
                type: array
                required: true
              - name: market
                type: string
                required: true
              - name: topic
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - topic
            - market
            - bids
            - asks
          properties:
            asks:
              type: array
              items: &ref_0
                type: object
                required:
                  - price
                  - size
                properties:
                  price:
                    type: number
                    format: double
                    x-parser-schema-id: <anonymous-schema-142>
                  size:
                    type: number
                    format: double
                    x-parser-schema-id: <anonymous-schema-143>
                x-parser-schema-id: NormalizedPriceLevel
              x-parser-schema-id: <anonymous-schema-141>
            bids:
              type: array
              items: *ref_0
              x-parser-schema-id: <anonymous-schema-144>
            market:
              type: string
              x-parser-schema-id: <anonymous-schema-145>
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-146>
          x-parser-schema-id: MarketDepthResponse
        title: Market depth message
        description: >-
          Market order book depth with aggregated price levels. Optional
          aggregationLevel parameter (1, 2, 5, 10, 100, or 1000) can be appended
          to the topic, defaults to 1 if not specified.
        example: |-
          {
            "topic": "depth:0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890:1",
            "market": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
            "bids": [
              {
                "price": 50000,
                "size": 10.5
              },
              {
                "price": 49950,
                "size": 15.2
              },
              {
                "price": 49900,
                "size": 20
              }
            ],
            "asks": [
              {
                "price": 50050,
                "size": 8.3
              },
              {
                "price": 50100,
                "size": 12.7
              },
              {
                "price": 50150,
                "size": 18.5
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: MarketDepthMessage
          - id: x-parser-message-name
            value: MarketDepthMessage
    bindings: []
    extensions:
      - id: x-parser-unique-object-id
        value: marketDepth
sendOperations:
  - *ref_1
receiveOperations: []
sendMessages:
  - *ref_2
receiveMessages: []
extensions:
  - id: x-parser-unique-object-id
    value: marketDepth
securitySchemes: []

````