fix(hub): load full pre-entry history for archive chart pan/zoom

range=history serves archive seed through close (not now). Default view focuses hold period; user can scroll/zoom left to see global morphology before entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-07 23:20:37 +08:00
parent 54c0b169c7
commit 5ceacd8077
6 changed files with 126 additions and 26 deletions
+2
View File
@@ -1734,6 +1734,7 @@ def api_archive_ohlcv(
anchor_ms: str = "",
opened_ms: str = "",
closed_ms: str = "",
range: str = "",
at: str = "",
bars: str = "",
):
@@ -1758,6 +1759,7 @@ def api_archive_ohlcv(
closed_ms=close_ms,
mode=mode,
bars=bar_n,
range_mode=(range or "").strip().lower() or "window",
)
if not result.get("ok"):
raise HTTPException(status_code=404, detail=result.get("msg") or "无 K 线")