跳转至

盘口 L1 推送

连接地址

wss://stock-data-api.aibot6.cn/ws/orderbook

鉴权方式

支持两种方式:

  1. URL 参数追加 ?token=sk-xxxxx
  2. Sec-WebSocket-Protocol 中传递 Bearer,sk-xxxxx

示例

const socket = new WebSocket("wss://stock-data-api.aibot6.cn/ws/orderbook?token=sk-demo");

订阅格式

{
  "action": "subscribe",
  "code": "600000.SH",
  "depth": 5
}

推送数据示例

{
  "code": 1,
  "message": "success",
  "data": {
    "code": "600000.SH",
    "ts": "2025-08-10 09:30:01",
    "buy": [{"price": 10.25, "volume": 1000}],
    "sell": [{"price": 10.26, "volume": 900}],
    "source": "tencent"
  }
}