Skip to content

Keep Binance spot bars after the 2025 archive timestamp change - #162

Merged
stefan-jansen merged 2 commits into
mainfrom
fix/binance-spot-archive-time
Nov 25, 2026
Merged

stefan-jansen merged 2 commits into
mainfrom
fix/binance-spot-archive-time

Conversation

@stefan-jansen

Copy link
Copy Markdown
Contributor

Binance changed the timestamp unit in its public spot archives on January 1, 2025. The synchronous and asynchronous public fetch paths interpreted those values as milliseconds, so filtering to the requested dates silently discarded valid bars. Both paths now normalize the archive values to UTC microseconds before combining files. Futures archives continue to decode their millisecond timestamps.

The regression requests daily BTCUSDT bars spanning the unit change through both public interfaces, with ZIP archives supplied at the HTTP boundary. On the base revision both spot cases lost January 1 and both futures controls passed. All 65 provider tests pass with the fix, along with Ruff and ty. No live provider requests were needed.

Source: https://github.com/binance/binance-public-data#data-collection

Closes #159.

@stefan-jansen
stefan-jansen merged commit e153720 into main Nov 25, 2026
33 checks passed
@stefan-jansen
stefan-jansen deleted the fix/binance-spot-archive-time branch November 25, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: BinancePublicProvider returns zero daily rows for 2025 and later, without an error

1 participant