feat: 补全 A 股历史资金流向序列功能

1. 新增命令:实现 GetHistoryFundFlowCmd (0x052d Category 22) 用于拉取历史资金分布。
2. 新增模型:增加 HistoricalFundFlow 结构,支持超大/大/中/小单的双向统计。
3. 客户端 API:TdxClient/AsyncTdxClient 增加 get_history_fund_flow() 接口。
4. 单元测试:在 test_a_share_extensions.py 中增加响应包解析逻辑验证。
5. 文档更新:README.md 同步 API 及数据模型定义。
This commit is contained in:
M
2026-04-15 15:26:51 +08:00
parent 4dabbf6d15
commit daaba7dc13
5 changed files with 158 additions and 17 deletions
+9
View File
@@ -106,6 +106,7 @@ client = AsyncTdxClient.from_best_host(ping_timeout=5.0)
| `get_transaction_data(market, code, start, count=800)` | 当日逐笔成交(分页) |
| `get_history_transaction_data(market, code, date, start, count=800)` | 历史逐笔成交 |
| `get_fund_flow(market, code)` | 当日资金流向统计(超大/大/中/小单) |
| `get_history_fund_flow(market, code, start, count)` | 历史日线资金流向序列(Category 22 |
| `get_xdxr_info(market, code)` | 除权除息历史 |
| `get_finance_info(market, code)` | 最新财务数据 |
| `get_company_info_category(market, code)` | 公司信息文件目录 |
@@ -205,6 +206,14 @@ super_in/out large_in/out medium_in/out small_in/out
main_net_inflow total_net_inflow
```
### HistoricalFundFlow(历史资金流序列)
```
year month day
super_in/out large_in/out medium_in/out small_in/out
main_net_inflow
```
## 修复的 pytdx Bug