Skip to content

Description

Use books for snapshot data, book1 for 1 depth level, book5 for 5 depth levels, book15 for 15 depth levels.

  • books: Push the full snapshot data for the first time, push all afterwards, that is, if there is a change in depth, the depth data that has changed will be pushed.
  • book1: 1 depth level will be pushed every time.
  • book5: 5 depth levels will be pushed every time.
  • book15: 15 depth levels will be pushed every time.

Request Parameters

ParameterTypeRequiredDescription
opStringYesOperation, subscribe unsubscribe
argsList<Object>YesList of channels to request subscription
> chStringYesChannel name: depth_books,depth_book1,depth_book5,depth_book15
> symbolStringYesProduct ID

request example:

json
{
    "op":"subscribe",
    "args":[
        {
            "symbol":"BTCUSDT",
            "ch":"depth_book1"  
        }
    ]
}

Push Parameters

ParameterTypeDescription
chObjectChannel name
symbolStringProduct ID
tsInt64Time stamp
dataStringSubscription data
> aList<String>Seller depth
> bList<String>Buyer depth

push data:

json
{
  "ch": "depth_book1",               
  "symbol": "BTCUSDT",
  "ts": 1732178884994,
  "data":{                               
        "b":[                            
             [
                  "7403.89",             
                  "0.002"                
             ]
            ],
        "a": [                           
             [
                 "7405.96",              
                 "3.340"                 
             ]
        ]
   }
}