Skip to Content
🚀 Spot API现货 WebSocket有限档深度信息

有限档深度信息

订阅地址

环境地址
PRODwss://stream.bittap.com/endpoint?format=JSON

订阅参数

Stream 名称: s_depth<level>@<symbol>_scale。

参数名描述
level深度档位, level默认值30
symbol交易对
scale聚合精度, scale取值见交易对配置的深度精度

数据更新

参数名类型描述
eSTRINGtopic
sSTRING交易对
iSTRING聚合精度
lastUpdateIdLONG最近更新id
bidsARRAY买单
asksARRAY卖单

订阅示例

{ "method": "SUBSCRIBE", "params": [ "s_depth1@BTC-USDT_0.01" ], "id": "eru1bat" }

订阅成功示例

{ "code": 0, // 0代表成功 非0代表失败 "msg":"", // 失败原因 成功时值为null "topic": ["", ""], // 订阅失败的topic "id": 1 }

数据更新示例

{ "e": "s_depth1", //topic "s": "BTC-USDT", //交易对 "i": "0.01", //聚合精度 "lastUpdateId": 1777735424, //最近更新id "bids": [ //买单 [ "106610.65", //价格 "2.028125" //数量 ] ], "asks": [ //卖单 [ "106610.66", "2.90337" ] ] }

取消订阅示例

{ "method": "UNSUBSCRIBE", "params": [ "s_depth1@BTC-USDT_0.01" ], "id": "eru1bat" }

错误码解释

错误码描述

代码示例

最后更新于: