修复 Gate K 线分页:单次不足 300 根时继续拉取至最新
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+3
-3
@@ -255,9 +255,9 @@ def resolve_chart_bars(
|
||||
remote_err: Optional[str] = None
|
||||
|
||||
if need_fetch:
|
||||
since = fetch_start_ms
|
||||
if db_rows and not force_refresh:
|
||||
since = min(since, int(db_rows[0]["open_time_ms"]))
|
||||
since = None
|
||||
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,
|
||||
timeframe=tf,
|
||||
|
||||
Reference in New Issue
Block a user