Skip to main content

Depth Information

Description​

Real-time order book data is delivered as a subscription stream, not a request/response call. Connect to wss://api.ztdxtest.xyz/ws and subscribe to the orderbook:{symbol} channel.

Upon subscribing, the server immediately pushes a snapshot of the current book, then pushes a full update every 500 ms. Each push contains the top 30 levels on each side.

Subscribe​

{
"type": "subscribe",
"channel": "orderbook:BTCUSDT"
}

The server confirms with:

{
"type": "subscribed",
"channel": "orderbook:BTCUSDT"
}

Push Example​

{
"type": "orderbook",
"symbol": "BTCUSDT",
"source": "internal",
"epoch": "72622087-56bd-49dd-b76a-97f031e550de",
"book_seq": 936902,
"snapshot_type": "snapshot",
"timestamp": 1795070733460,
"bids": [
{ "price": "63528.3", "size": "0.007" }
],
"asks": [
{ "price": "63529.0", "size": "0.006" }
],
"user_orders": {
"bids": [["63528.3", "0.007"]],
"asks": [["63529.0", "0.006"]]
}
}

See WebSocket API General Info for connection, authentication, and the full channel list. For a point-in-time REST snapshot, use GET /fapi/v1/depth.