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

# Depth



## AsyncAPI

````yaml asyncapi.json depth
id: depth
title: Depth
description: ''
servers:
  - id: production
    protocol: wss
    host: api.tickdb.ai
    bindings: []
    variables: []
address: /v1/realtime
parameters: []
bindings: []
operations:
  - &ref_3
    id: subscribeToDepth
    title: Subscribe to depth
    type: send
    messages:
      - &ref_5
        id: depthData
        contentType: application/json
        payload:
          - name: Order Book Depth Data
            description: Real-time order book depth data pushed from server
            type: object
            properties:
              - name: cmd
                type: string
                description: Message type
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: symbol
                    type: string
                    description: Trading symbol
                    required: true
                  - name: type
                    type: string
                    description: Symbol type
                    enumValues:
                      - stock
                      - indices
                      - crypto
                      - forex
                      - futures
                    required: false
                  - name: bids
                    type: array
                    description: Bid orders [price, quantity]
                    required: true
                    properties:
                      - name: item
                        type: array
                        required: false
                        properties:
                          - name: item
                            type: string
                            required: false
                  - name: asks
                    type: array
                    description: Ask orders [price, quantity]
                    required: true
                    properties:
                      - name: item
                        type: array
                        required: false
                        properties:
                          - name: item
                            type: string
                            required: false
                  - name: timestamp
                    type: integer
                    description: Unix timestamp in milliseconds
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          properties:
            cmd:
              type: string
              const: depth
              description: Message type
              x-parser-schema-id: <anonymous-schema-23>
            data:
              type: object
              additionalProperties: false
              properties:
                symbol:
                  type: string
                  example: BTCUSDT
                  description: Trading symbol
                  x-parser-schema-id: <anonymous-schema-25>
                type:
                  type: string
                  enum:
                    - stock
                    - indices
                    - crypto
                    - forex
                    - futures
                  description: Symbol type
                  x-parser-schema-id: <anonymous-schema-26>
                bids:
                  type: array
                  items:
                    type: array
                    items:
                      type: string
                      x-parser-schema-id: <anonymous-schema-29>
                    minItems: 2
                    maxItems: 2
                    x-parser-schema-id: <anonymous-schema-28>
                  example:
                    - - '43250.50'
                      - '0.125'
                    - - '43250.00'
                      - '0.250'
                  description: Bid orders [price, quantity]
                  x-parser-schema-id: <anonymous-schema-27>
                asks:
                  type: array
                  items:
                    type: array
                    items:
                      type: string
                      x-parser-schema-id: <anonymous-schema-32>
                    minItems: 2
                    maxItems: 2
                    x-parser-schema-id: <anonymous-schema-31>
                  example:
                    - - '43251.00'
                      - '0.180'
                    - - '43251.50'
                      - '0.320'
                  description: Ask orders [price, quantity]
                  x-parser-schema-id: <anonymous-schema-30>
                timestamp:
                  type: integer
                  example: 1703123456789
                  description: Unix timestamp in milliseconds
                  x-parser-schema-id: <anonymous-schema-33>
              required:
                - symbol
                - bids
                - asks
                - timestamp
              x-parser-schema-id: <anonymous-schema-24>
          required:
            - cmd
            - data
          x-parser-schema-id: <anonymous-schema-22>
        title: Order Book Depth Data
        description: Real-time order book depth data pushed from server
        example: No examples found
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: depthData
    bindings: []
    extensions: &ref_1
      - id: x-parser-unique-object-id
        value: depth
  - &ref_2
    id: receiveDepthData
    title: Receive depth data
    type: receive
    messages:
      - &ref_4
        id: subscribeRequest
        contentType: application/json
        payload:
          - name: Subscribe/Unsubscribe to Order Book Depth
            description: Subscribe or unsubscribe to real-time order book depth updates
            type: object
            properties:
              - name: cmd
                type: string
                description: Command type (subscribe or unsubscribe)
                enumValues:
                  - subscribe
                  - unsubscribe
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: channel
                    type: string
                    description: Channel name
                    enumValues:
                      - ticker
                      - depth
                      - trade
                    required: true
                  - name: symbols
                    type: array
                    description: List of trading symbols to subscribe/unsubscribe
                    examples: &ref_0
                      - AAPL.US
                      - 700.HK
                      - EURUSD
                      - XAUUSD
                      - BTCUSDT
                      - IC2606
                    required: true
                    properties:
                      - name: item
                        type: string
                        required: false
                  - name: type
                    type: string
                    description: >-
                      Symbol type, optional. Not required when the symbol is
                      unambiguous; if the server returns an AMBIGUOUS_SYMBOL
                      error, pass the value as indicated
                    enumValues:
                      - stock
                      - indices
                      - crypto
                      - forex
                      - futures
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          properties:
            cmd:
              type: string
              enum:
                - subscribe
                - unsubscribe
              description: Command type (subscribe or unsubscribe)
              x-parser-schema-id: <anonymous-schema-16>
            data:
              type: object
              additionalProperties: false
              properties:
                channel:
                  type: string
                  enum:
                    - ticker
                    - depth
                    - trade
                  default: depth
                  description: Channel name
                  x-parser-schema-id: <anonymous-schema-18>
                symbols:
                  type: array
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-20>
                  examples: *ref_0
                  description: List of trading symbols to subscribe/unsubscribe
                  x-parser-schema-id: <anonymous-schema-19>
                type:
                  type: string
                  enum:
                    - stock
                    - indices
                    - crypto
                    - forex
                    - futures
                  description: >-
                    Symbol type, optional. Not required when the symbol is
                    unambiguous; if the server returns an AMBIGUOUS_SYMBOL
                    error, pass the value as indicated
                  x-parser-schema-id: <anonymous-schema-21>
              required:
                - channel
                - symbols
              x-parser-schema-id: <anonymous-schema-17>
          required:
            - cmd
            - data
          x-parser-schema-id: <anonymous-schema-15>
        title: Subscribe/Unsubscribe to Order Book Depth
        description: Subscribe or unsubscribe to real-time order book depth updates
        example: No examples found
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeRequest
    bindings: []
    extensions: *ref_1
sendOperations:
  - *ref_2
receiveOperations:
  - *ref_3
sendMessages:
  - *ref_4
receiveMessages:
  - *ref_5
extensions:
  - id: x-parser-unique-object-id
    value: depth
securitySchemes:
  - id: apiKey
    name: api_key
    type: httpApiKey
    in: query
    extensions: []

````