fix(hub): merge strategy snapshots into archive for gate_bot

Include strategy_trade_snapshots when trade_records is empty, harden SQL for older schemas, and show per-exchange sync errors in the archive UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-07 23:02:46 +08:00
parent 6a56928d59
commit 3052607280
6 changed files with 396 additions and 34 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
| 项 | 约定 |
|----|------|
| 列表粒度 | 一所一币一行 |
| 交易来源 | 四所 `trade_records`,经 `/api/hub/trades/archive` 拉取 |
| 交易来源 | 四所 `trade_records` + 未落库的 `strategy_trade_snapshots`gate_bot 趋势漏记时补全),经 `/api/hub/trades/archive` 拉取 |
| 筛选 | 交易所、有盈利单、有亏损单、犯病、情绪(中控 overlay) |
| K 线真源 | 仅 **5m** 写入 `hub_symbol_archive.db` |
| 建档种子 | 该币 **最早开仓** 向前 **30 天** 5m |