fix(data): restore pagination early-break + update test count
Code review on b977c37 flagged: with dataset smaller than limit=1000
(typical Phase 1 case), the loop made an extra HTTP request that
returned duplicate rows. Restored `if len(rows) < limit: break`
after extending. Test assertion adjusted from 2 to 1 calls.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,8 @@ class OHLCVLoader:
|
||||
if not rows:
|
||||
break
|
||||
all_rows.extend(rows)
|
||||
if len(rows) < limit:
|
||||
break
|
||||
last_ts = rows[-1][0]
|
||||
new_since = last_ts + timeframe_ms
|
||||
if new_since <= since:
|
||||
|
||||
Reference in New Issue
Block a user