mirror of
https://ghfast.top/https://github.com/aeroxw/easy_tdx_max.git
synced 2026-09-12 14:34:18 +08:00
fix(mac): 板块列表涨速恒 0——值槽实为排序键列值,暴露 sort_column(issue #53)
抓包+对值锚定确认:0x1231 响应中 price 与 pre_close 之间的 float 是 "当前排序列的值"(板块与领涨股各一份),并非固定涨速;此前硬编码 sort_column=0(涨跌幅,仅排序键、值槽恒 0),故该列永远全 0。 排序列映射(实测):0=涨跌幅(值槽恒0) 1=涨速 2=3日 3=20日 4=60日 5=年初至今 6=5日 7=10日。 - 新增 BoardSortColumn 枚举并公开导出;get_board_list(sync/async) 新增 sort_column 参数,取涨速传 SPEED,默认涨跌幅排序行为不变 - BoardInfo 字段更名 rise_speed→sort_value、symbol_rise_speed→ symbol_sort_value(旧名语义错误且恒 0,属破坏性更名) - Web /board-mac/list 新增 sort_column 参数;CLI board-list 新增 --sort - 新增 9 个测试;README 示例更新
This commit is contained in:
@@ -1348,10 +1348,11 @@ with MacClient.from_best_host() as c:
|
||||
#### 板块
|
||||
|
||||
```python
|
||||
from easy_tdx import BoardType
|
||||
from easy_tdx import BoardSortColumn, BoardType
|
||||
|
||||
with MacClient.from_best_host() as c:
|
||||
df = c.get_board_list(BoardType.GN) # 概念板块
|
||||
df = c.get_board_list(sort_column=BoardSortColumn.SPEED) # 按涨速排序取涨速%
|
||||
df = c.get_board_members("881001", sort_type=SortType.CHANGE_PCT)
|
||||
df = c.get_belong_board(Market.SZ, "000001") # 个股所属板块
|
||||
|
||||
@@ -1773,7 +1774,7 @@ with MacClient.from_best_host() as client:
|
||||
| `get_chart_sampling(market, code)` | 分时缩略采样 |
|
||||
| `get_transactions(market, code, ...)` | 逐笔成交 |
|
||||
| `get_symbol_info(market, code)` | 个股特征快照 |
|
||||
| `get_board_list(board_type, ...)` | 板块列表 |
|
||||
| `get_board_list(board_type, ..., sort_column)` | 板块列表(sort_value 列=排序键指标值) |
|
||||
| `get_board_members(board_symbol, ...)` | 板块成分股报价 |
|
||||
| `get_board_summary(board_symbol, ...)` | 板块汇总(成交额、主力净流入、涨跌家数) |
|
||||
| `get_board_ranking(board_type, top_n, sort_by, ...)` | 板块涨跌幅排行榜(行业/概念排行) |
|
||||
|
||||
Reference in New Issue
Block a user