507b79f257
2、新增索引和缓存;
7.1 KiB
7.1 KiB
二板日历接口文档
1. 基本信息
- 接口名称:二板日历
- 请求方法:
GET - 请求路径:
/api/v1/limit-board/second-cal - 接口用途:按交易日统计每日二板数量、二板封板数量、二板炸板数量,以及二板股票 T+1 盘中盈利概率。
2. 请求参数
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
tradeStartDate |
string |
是 | 无 | T 日起始日期,格式 YYYY-MM-DD |
tradeEndDate |
string |
是 | 无 | T 日结束日期,格式 YYYY-MM-DD |
兼容 start_date、end_date 作为日期参数别名。
请求示例:
GET /api/v1/limit-board/second-cal?tradeStartDate=2026-05-07&tradeEndDate=2026-05-11
3. 统计规则
- 以
trade_calendar中exchange = 'SSE'且is_open = 1的记录推导 T-2、T-1、T、T+1 交易日。 - T-1 涨停样本来自
limit_list_d,条件为limit = 'U'。 - T-2 同一股票不能在
limit_list_d中存在limit = 'U'的记录。 - 股票所属板块和行业来自
stock_basic.market、stock_basic.industry。 - T 日行情来自
stock_daily,当 T 日最高价high触及按 T-1 收盘价和板块涨跌幅规则计算的涨停价时,计为二板。 - 涨停价比例按板块计算:北交所 30%,创业板/科创板 20%,其余名称包含 ST 的股票 5%,其他股票 10%。
- T 日
close与high一致时,计为二板封板,status = "limit"。 - T 日
close小于high时,计为二板炸板,status = "break"。 first_limit_time和open_times来自 T 日二板记录,封板取limit_list_d.limit = 'U'记录,炸板取limit_list_d.limit = 'Z'记录;时间格式化为HH:MM:SS。- T+1 盘中盈利统一按
T+1 high > T high判断,概率分母只统计具备 T 日最高价和 T+1 最高价的数据。
4. 响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
trade_start_date |
string |
查询起始 T 日 |
trade_end_date |
string |
查询结束 T 日 |
summary |
object |
日期范围汇总统计 |
list |
array |
每个交易日的二板日历统计 |
4.1 summary/list 单日统计字段
| 字段 | 类型 | 说明 |
|---|---|---|
second_board_count |
int |
二板股票数量 |
limit_count |
int |
二板封板数量 |
break_count |
int |
二板炸板数量 |
next_trade_data_count |
int |
具备 T+1 盈利判断数据的数量 |
next_intraday_profit_count |
int |
T+1 盘中盈利数量 |
next_intraday_profit_rate |
number |
T+1 盘中盈利概率,百分比 |
limit_next_data_count |
int |
封板股中具备 T+1 盈利判断数据的数量 |
limit_next_profit_count |
int |
封板股 T+1 盘中盈利数量 |
limit_next_profit_rate |
number |
封板股 T+1 盘中盈利概率,百分比 |
break_next_data_count |
int |
炸板股中具备 T+1 盈利判断数据的数量 |
break_next_profit_count |
int |
炸板股 T+1 盘中盈利数量 |
break_next_profit_rate |
number |
炸板股 T+1 盘中盈利概率,百分比 |
4.2 list[].stocks 明细字段
list[].stocks 保留当日全部二板明细。
list[].total_stocks 为当日涨停和炸板合并后的明细列表,字段结构与 stocks 相同;该列表会剔除 first_limit_time 为空的数据,并按 first_limit_time 升序排序,时间相同时按 ts_code 升序排序。
| 字段 | 类型 | 说明 |
|---|---|---|
trade_date |
string |
T 日 |
previous_trade_date |
string |
T-1 交易日 |
previous_two_trade_date |
string |
T-2 交易日 |
next_trade_date |
string |
T+1 交易日 |
symbol / ts_code / name |
string |
股票标识 |
market / industry |
string |
板块和行业 |
previous_close |
number | null |
T-1 收盘价 |
limit_price |
number | null |
T 日涨停价 |
t_high / t_close |
number | null |
T 日最高价和收盘价 |
t_pct_chg |
number | null |
T 日收盘涨跌幅 |
status |
string |
limit 表示封板,break 表示炸板 |
first_limit_time |
string |
T 日二板首次涨停时间,格式化为 HH:MM:SS;无数据时为空字符串 |
open_times |
int | null |
T 日二板开板次数 |
next_high / next_close |
number | null |
T+1 最高价和收盘价 |
next_intraday_profitable |
boolean | null |
T+1 盘中是否盈利 |
next_high_profit_pct |
number | null |
T+1 最高价相对 T 日最高价的收益率 |
5. 响应示例
{
"trade_start_date": "2026-05-07",
"trade_end_date": "2026-05-11",
"summary": {
"trade_day_count": 3,
"second_board_count": 51,
"limit_count": 41,
"break_count": 10,
"next_trade_data_count": 35,
"next_intraday_profit_count": 34,
"next_intraday_profit_rate": 97.14,
"limit_next_data_count": 29,
"limit_next_profit_count": 28,
"limit_next_profit_rate": 96.55,
"break_next_data_count": 6,
"break_next_profit_count": 6,
"break_next_profit_rate": 100
},
"list": [
{
"trade_date": "2026-05-07",
"previous_trade_date": "2026-05-06",
"previous_two_trade_date": "2026-04-30",
"next_trade_date": "2026-05-08",
"second_board_count": 19,
"limit_count": 16,
"break_count": 3,
"next_trade_data_count": 19,
"next_intraday_profit_count": 18,
"next_intraday_profit_rate": 94.74,
"limit_next_data_count": 16,
"limit_next_profit_count": 15,
"limit_next_profit_rate": 93.75,
"break_next_data_count": 3,
"break_next_profit_count": 3,
"break_next_profit_rate": 100,
"total_stocks": [
{
"trade_date": "2026-05-07",
"previous_trade_date": "2026-05-06",
"previous_two_trade_date": "2026-04-30",
"next_trade_date": "2026-05-08",
"symbol": "000001",
"ts_code": "000001.SZ",
"name": "示例股份",
"market": "主板",
"industry": "银行",
"previous_close": 10,
"limit_price": 11,
"t_high": 11,
"t_close": 11,
"t_pct_chg": 10,
"status": "limit",
"first_limit_time": "09:35:12",
"open_times": 0,
"next_high": 11.2,
"next_close": 11.1,
"next_intraday_profitable": true,
"next_high_profit_pct": 1.82
}
],
"stocks": [
{
"trade_date": "2026-05-07",
"previous_trade_date": "2026-05-06",
"previous_two_trade_date": "2026-04-30",
"next_trade_date": "2026-05-08",
"symbol": "000001",
"ts_code": "000001.SZ",
"name": "示例股份",
"market": "主板",
"industry": "银行",
"previous_close": 10,
"limit_price": 11,
"t_high": 11,
"t_close": 11,
"t_pct_chg": 10,
"status": "limit",
"first_limit_time": "09:35:12",
"open_times": 0,
"next_high": 11.2,
"next_close": 11.1,
"next_intraday_profitable": true,
"next_high_profit_pct": 1.82
}
]
}
]
}