Strategy Auction Today 策略列表¶
来源同步:
/Users/mac/Projects/chatgpt-codex/doc/wss_StrategyAuction.md所属接口集:
策略竞价推送
请求 URL¶
wss://stock-data-api.aibot6.cn/ws/strategy/auction/today/
认证方式¶
Bearer Token(详见 认证与签名)
接口概述¶
实时推送当日策略竞价候选列表,支持分页、排序和策略筛选。服务端以 1 秒间隔持续刷新推送完整列表数据。连接建立后立即发送一次初始空列表(保持连接活跃),随后持续推送真实数据。
连接参数¶
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| token | string | 是 | API Token |
| day | string | 否 | 交易日,格式 YYYYMMDD,默认当天 |
| page | int | 否 | 页码,默认 1 |
| page_size | int | 否 | 每页条数,默认 30 |
| sort | string | 否 | 排序字段,默认 bigorder_net_shares_today |
| order | string | 否 | 排序方向,asc 或 desc,默认 desc |
| strategy | string | 否 | 策略筛选,默认 all |
可选排序字段:
- bigorder_net_shares_today — 当日大单净买入(默认)
- auction_strength — 竞价强度
- pct_chg — 涨跌幅
- today_vol_ratio — 量比
- pre_price_speed_ratio — 昨日价格速度
- ts — 时间戳
示例连接地址:
wss://stock-data-api.aibot6.cn/ws/strategy/auction/today/?token=your_token&day=20260801&page=1&page_size=30&sort=bigorder_net_shares_today&order=desc&strategy=all
消息格式¶
发送消息(客户端→服务端)¶
订阅:
{
"action": "subscribe",
"day": "20260801",
"page": 1,
"page_size": 30,
"sort": "bigorder_net_shares_today",
"order": "desc",
"strategy": "all"
}
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| action | string | 是 | subscribe 或 unsubscribe |
| day | string | 否 | 交易日 |
| page | int | 否 | 页码 |
| page_size | int | 否 | 每页条数 |
| sort | string | 否 | 排序字段 |
| order | string | 否 | 排序方向,asc 或 desc |
| strategy | string | 否 | 策略筛选 |
取消订阅:
取消订阅后
page_size置 0,暂停推送。
接收消息(服务端→客户端)¶
初始空列表(连接建立后立即发送):
{
"code": 1,
"message": "success",
"data": {
"type": "strategy_auction_today",
"date": "20260801",
"query": {
"page": 1,
"page_size": 30,
"sort": "bigorder_net_shares_today",
"order": "desc",
"strategy": "all"
},
"count": 0,
"items": []
}
}
正常推送:
{
"code": 1,
"message": "success",
"data": {
"type": "strategy_auction_today",
"date": "20260801",
"query": {
"page": 1,
"page_size": 30,
"sort": "bigorder_net_shares_today",
"order": "desc",
"strategy": "all"
},
"count": 123,
"items": [
{
"code6": "600000",
"ts_code": "600000.SH",
"name": "浦发银行",
"sector_name": "银行",
"sector_momentum": 0.12,
"block_name": "上证主板",
"theme_name": "国企改革",
"bigorder_net_shares_today": 1250000.0,
"today_vol_ratio": 0.35,
"pre_vol_ratio": 0.32,
"vol": 21500000.0,
"free_float_shares": null,
"close": 10.82,
"pre_close": 10.71,
"pct_chg": 1.02,
"auction_strength": "0.62",
"trend_strength": "0.58",
"price_speed_ratio": 0.45,
"pre_price_speed_ratio": 0.28,
"ma5": 10.75,
"ma10": 10.68,
"ma20": 10.55,
"ma60": 10.20,
"ma180": 9.85,
"pct_5d_recent": 2.1,
"pct_10d_recent": 3.4,
"pct_20d_recent": 5.6,
"pre_vol": 18000000,
"limit_reason": "",
"signal_strength": "A",
"strategy_tag": "趋势突破",
"score_total": "72.3",
"is_hot": 1,
"is_leader": 0,
"is_rank": 1,
"price_30m_ago": 10.78
}
]
}
}
| 字段 | 类型 | 说明 |
|---|---|---|
| code | int | 状态码,1 表示成功 |
| message | string | 状态描述 |
| data.type | string | 固定为 strategy_auction_today |
| data.date | string | 交易日 |
| data.query | object | 当前查询参数 |
| data.count | int | 符合条件的总条数 |
| data.items | array | 当前页数据列表 |
items 主要字段:
| 字段 | 类型 | 说明 |
|------|------|------|
| code6 | string | 6 位股票代码 |
| ts_code | string | 带市场后缀代码 |
| name | string | 股票名称 |
| close | float | 最新价(来自 1m state 或 bigdata) |
| pre_close | float | 昨收价 |
| pct_chg | float | 涨跌幅(由 close 与 pre_close 计算) |
| bigorder_net_shares_today | float | 当日大单净买入股数 |
| today_vol_ratio | float | 量比 |
| price_speed_ratio | float | 价格速度比率 |
| ma5 / ma10 / ma20 / ma60 / ma180 | float | 各周期均线 |
| pct_5d_recent | float | 近 5 日涨幅 |
| pct_10d_recent | float | 近 10 日涨幅 |
| pct_20d_recent | float | 近 20 日涨幅 |
| pre_vol | int | 昨日成交量 |
| vol | float | 成交量 |
心跳机制¶
无显式心跳/ ping-pong 机制。服务端以 1 秒间隔持续推送数据,若连接异常断开则需客户端重新建立连接。
接口说明¶
- 推送频率:1 秒一次
- 连接建立后立即发送初始空列表,随后持续推送真实数据
- 数据源:Redis HASH
{prefix}:strategy:auction:{day}:{code6}+{prefix}:monitor:bigdata:{day}:{code6}+ DBStrategyBasicSnapshot - 排序时,排序字段为
None的记录排在末尾 - 分页:基于排序后的完整列表切片,返回当前页数据
pct_chg优先由close与pre_close计算得出