mirror of
https://ghfast.top/https://github.com/aeroxw/easy-tdx.git
synced 2026-09-12 18:04:16 +08:00
fix: route index files to get_index_bars() in sync-daily/sync-all
Root cause: _fetch_all_daily_bars used get_security_bars() for all files, but index server responses have 4 extra bytes per record. Wrong parser produced garbage dates like '12897-50-77' for sh000001, sh000300, etc. Fix: add _is_index_code() to detect index codes by prefix (sh: 00/88/99, sz: 39) and route to get_index_bars() accordingly. Bumps version to 1.6.1.
This commit is contained in:
@@ -785,6 +785,14 @@ ruff format --check src/ tests/ # format check
|
||||
|
||||
## Changelog
|
||||
|
||||
### 1.6.1 (2026-06-07)
|
||||
|
||||
**Bug 修复** — 修复 sync-all/sync-daily 对指数文件误用股票解析器导致垃圾日期的问题。
|
||||
|
||||
- 修复 `_fetch_all_daily_bars` 对指数文件(sh00/sh88/sh99, sz39)错误调用 `get_security_bars()` 的问题
|
||||
- 指数文件现在正确使用 `get_index_bars()`(服务端响应每条记录多 4 字节上涨/下跌家数)
|
||||
- 新增 `_is_index_code()` 辅助函数,根据市场和代码前缀判断证券类型
|
||||
|
||||
### 1.6.0 (2026-06-07)
|
||||
|
||||
**离线数据写入同步** — 从服务端获取最新日线数据并写入本地通达信 .day 文件,替代通达信内置下载功能。
|
||||
|
||||
Reference in New Issue
Block a user