Skip to Content
📈 Futures APIFutures WebSocketLimited Order Book Depth

Limited Order Book Depth

Subscribe URL

wss://stream.bittap.com/endpoint?format=JSON

Subscribe Parameters

Stream name: f_depth<level>@<symbol>_scale.

ParameterDescription
levellevel indicates the number of bid/ask levels, The default value for level is 30
symboltrading pair
scalescale indicates aggregation precision, The value for scale can be found in the depth and precision settings of the trading pair

Data Update

NameTypeDescription
eSTRINGTopic
sSTRINGtrading pair
iSTRINGaggregation precision
lastUpdateIdLONGlast update id
bidsARRAYbuy orders
asksARRAYsell orders

Subscribe Example

{ "method": "SUBSCRIBE", "params": [ "f_depth1@BTC-USDT-M_0.01" ], "id": "eru1bat" }

Subscribe Success Example

{ "code": 0, // 0 means success, non-0 means failure "msg":"", // failure reason, null when success "topic": ["", ""], // topics that failed to subscribe "id": 1 }

Data Update Example

{ "e": "f_depth1", // topic "s": "BTC-USDT-M", // trading pair "i": "0.01", // aggregation precision "lastUpdateId": 1777735424, // last update id "bids": [ // buy orders [ "106610.65", // price "2.028125" // quantity ] ], "asks": [ // sell orders [ "106610.66", "2.90337" ] ] }

Unsubscribe Example

{ "method": "UNSUBSCRIBE", "params": [ "f_depth1@BTC-USDT-M_0.01" ], "id": "eru1bat" }

Error Codes

No information available

Code Example

Last updated on: