mirror of
https://github.com/shy3130/tick-stock-panel.git
synced 2026-11-02 10:26:13 +00:00
test(index-sync): 钉死 ETF 日K测试的日K路由并补全 daily 契约文档 (#502 后续)
- test_etf_adj_factor 的 TickFlow 分支用例补路由钉死: #502 后指数/ETF 同步跟随 daily_data_provider 偏好, 不钉死会被本机 preferences.json 配置的自定义日K源干扰 - docs/custom-data-source.md 补全 daily 数据集的指数/ETF 路由说明: 按契约传 asset_type(stock/index/etf), 仅支持股票的源对其他资产类型 返回空数据, 该轮同步告警回退 TickFlow
This commit is contained in:
@@ -79,6 +79,9 @@ def test_etf_incremental_daily_reapplies_adj_to_history(tmp_path, monkeypatch):
|
||||
"sync_daily_batch",
|
||||
lambda *a, **k: _bar(NEW, NEW_RAW),
|
||||
)
|
||||
# 钉死日K路由为 tickflow: 本测试专测 TickFlow 分支, 不得被本机 preferences.json
|
||||
# 里配置的自定义日K源影响 (#502 后指数/ETF 同步路由跟随该偏好)。
|
||||
monkeypatch.setattr(index_sync.preferences, "get_daily_data_provider", lambda: "tickflow")
|
||||
monkeypatch.setattr(index_sync.preferences, "get_index_daily_batch_size", lambda: 50)
|
||||
|
||||
written = index_sync.sync_and_persist_etf_daily(
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
| 数据集 | 配置名 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| 日K | `daily` | 批量返回一组股票在指定区间内的日K |
|
||||
| 日K | `daily` | 批量返回一组标的在指定区间内的日K。个股、指数与 ETF 的日K同步都会路由到生效源,并按契约传入 `asset_type`(`stock`/`index`/`etf`);仅支持股票的源(如 fuyao/tdxquant/amber)对其他资产类型返回空数据即可,该轮同步会告警并回退 TickFlow,不会写入错误数据 |
|
||||
| 除权因子 | `adj_factor` | 批量返回一组股票的复权因子 |
|
||||
| 实时行情 | `realtime` | 返回全市场快照,用于盘中 enriched 增量计算 |
|
||||
| 分钟K | `minute` | 返回 1m 分钟K(需映射出 symbol / datetime / OHLC / 量; amount 成交额可缺省, 缺省时均价线降级显示 —) |
|
||||
|
||||
Reference in New Issue
Block a user