Messages
No examples foundNo examples foundWebSocket 文档
盘口深度(Depth)
WSS
/
v1
/
realtime
套餐权限
| 套餐 | 可用 |
|---|---|
| 免费版 | ❌ |
| 基础版 | ✅ |
| 专业版 | ✅ |
| 全量套餐(A 股、港股、美股) | ✅ |
| 企业版 | ✅ |
支持的市场
支持市场:美股、港股、A股、中国期货、加密货币订阅
{
"cmd": "subscribe",
"data": {
"channel": "depth",
"symbols": ["AAPL.US", "BTCUSDT"]
}
}
type对本次订阅中的全部代码生效。混合订阅不同产品类型时请省略type;仅在代码存在歧义时,按产品类型拆分订阅并传入对应值。
取消订阅
{
"cmd": "unsubscribe",
"data": {
"channel": "depth",
"symbols": ["AAPL.US"]
}
}
服务器响应
{
"cmd": "depth",
"data": {
"symbol": "BTCUSDT",
"bids": [
["43250.50", "0.125"],
["43250.00", "0.250"]
],
"asks": [
["43251.00", "0.180"],
["43251.50", "0.320"]
],
"timestamp": 1703123456789
}
}
字段说明
| 字段 | 类型 | 描述 |
|---|---|---|
| symbol | string | 交易品种 |
| bids | array | 买盘档位:[价格, 数量] |
| asks | array | 卖盘档位:[价格, 数量] |
| timestamp | int | 服务器时间戳(毫秒) |
bids:价格降序asks:价格升序
Messages
No examples foundNo examples foundapi_key
type:httpApiKey
订阅或取消订阅盘口深度
type:object
订阅或取消订阅实时盘口深度。
盘口深度数据
type:object
实时推送的盘口深度数据。
