fix(client): 历史资金流当日行全零 + 主力净额列缺失(issue #52)

三个根因(全部实测核实):
1. Category 22 直连接口为虚构协议——52 台已知服务器中 46 台可达的
   全部仅回 2 字节空包,从未成功过;移除死代码与臆造解析格式。
2. 历史逐笔接口当日数据要收盘清算后才有,日 K 盘中已含当日 bar,
   故 start=0 的最新一行恒为全 0——当日 bar 改走当日实时逐笔接口。
3. main_net_inflow 此前仅为 dataclass property,asdict 静默丢弃,
   返回 DataFrame 无主力净额列——新增 _fund_flow_df_with_net 物化
   (history 紧随 date 列、当日快照放首列)。

sync + async 双客户端同步修改;更新示例与三份文档;重写/新增回归
测试(当日实时逐笔路径、主力净额列断言)。
This commit is contained in:
GitHub
2026-08-26 15:00:53 +08:00
parent 7c9e19de93
commit 574ffdd2a4
8 changed files with 158 additions and 227 deletions
+2 -2
View File
@@ -260,6 +260,7 @@
| 字段名 | 中文 | 类型 | 说明 |
|--------|------|------|------|
| `main_net_inflow` | 主力净流入 | `float` | 列:超大+大净额(Issue #52 起物化为列) |
| `super_in` | 超大单流入 | `float` | 单笔 >100 万 |
| `super_out` | 超大单流出 | `float` | |
| `large_in` | 大单流入 | `float` | 20~100 万 |
@@ -268,7 +269,6 @@
| `medium_out` | 中单流出 | `float` | |
| `small_in` | 小单流入 | `float` | ≤4 万 |
| `small_out` | 小单流出 | `float` | |
| `main_net_inflow` | 主力净流入 | `float` | 属性:超大+大 |
| `total_net_inflow` | 全单净流入 | `float` | 属性:全部 |
---
@@ -277,7 +277,7 @@
来源:`get_history_fund_flow()`
字段同 FundFlow,额外包含:
字段同 FundFlow`main_net_inflow` 同样物化为列,紧随 `date` 之后),额外包含:
| 字段名 | 中文 | 类型 |
|--------|------|------|