fix(hub): 修复行情区 K 线 Gate 分页与图表 unexpected base

Gate OHLCV 分页在接近当前时间时停止并容错 from>to;分页失败时用 limit 兜底。chart.js 为 priceFormat 增加整数 base,setData 失败时回退默认精度。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-03 17:28:42 +08:00
parent e2bf58cfd3
commit c56326734e
4 changed files with 84 additions and 7 deletions
+7 -1
View File
@@ -256,7 +256,13 @@ def resolve_chart_bars(
if need_fetch:
since = fetch_start_ms
if db_rows and not force_refresh and newest_ok and len(db_rows) >= need:
# 仅当库内根数已够且缺口在尾部时做增量拉取;否则全量回看,避免 Gate from>to
if (
db_rows
and not force_refresh
and newest_ok
and len(db_rows) >= need
):
since = max(0, int(newest_db) - period_ms * 2)
remote = remote_fetch(
symbol=sym,