新增首页
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
- 服务前缀:`/api/v1`
|
||||
- 响应格式:`application/json`
|
||||
- 当前项目接口总数:10
|
||||
- 当前项目接口总数:11
|
||||
|
||||
## 2. 接口列表
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
| 涨停低开分组 | `GET` | `/api/v1/limit-board/open-lower-groups` | 获取查询日和前一交易日均涨停的股票,并按是否低于前一交易日收盘价分组 | [limit-board-open-lower-groups.md](./limit-board-open-lower-groups.md) |
|
||||
| 涨停开盘阈值分组 | `GET` | `/api/v1/limit-board/open-threshold` | 获取查询日和前一交易日均涨停的股票,并按开盘价是否低于前一交易日收盘价 101% 分组 | [limit-board-open-threshold.md](./limit-board-open-threshold.md) |
|
||||
| 二板早盘次日盈利 | `GET` | `/api/v1/limit-board/second-board-profit` | 分页查询 T-2 无涨停、T-1 涨停、T 涨停的次日盈利明细 | [download-second-board-profit-csv.md](./download-second-board-profit-csv.md) |
|
||||
| 二板日历 | `GET` | `/api/v1/limit-board/second-cal` | 按交易日统计二板数量、封板/炸板数量和 T+1 盘中盈利概率 | [second-cal.md](./second-cal.md) |
|
||||
| 炸板次日表现 | `GET` | `/api/v1/limit-board/break-next-performance` | 分页查询 T-2 未涨停、T-1 涨停、T 日炸板股票及 T+1 表现 | [limit-board-break-next-performance.md](./limit-board-break-next-performance.md) |
|
||||
| 下载 | `GET` | `/api/v1/download/limit-board/second-board-profit-csv` | 下载筛选条件范围内的二板早盘次日盈利 CSV 明细 | [download-second-board-profit-csv.md](./download-second-board-profit-csv.md) |
|
||||
| 下载 | `GET` | `/api/v1/download/limit-board/break-next-performance-csv` | 下载筛选条件范围内的炸板次日表现 CSV 明细 | [limit-board-break-next-performance.md](./limit-board-break-next-performance.md) |
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
# 二板日历接口文档
|
||||
|
||||
## 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` 作为日期参数别名。
|
||||
|
||||
请求示例:
|
||||
|
||||
```http
|
||||
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"`。
|
||||
- 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 明细字段
|
||||
|
||||
| 字段 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `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` 表示炸板 |
|
||||
| `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. 响应示例
|
||||
|
||||
```json
|
||||
{
|
||||
"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,
|
||||
"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",
|
||||
"next_high": 11.2,
|
||||
"next_close": 11.1,
|
||||
"next_intraday_profitable": true,
|
||||
"next_high_profit_pct": 1.82
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user