--- license: mit task_categories: - time-series-forecasting tags: - finance - cryptocurrency - order-book - market-microstructure - high-frequency pretty_name: Binance BTC/ETH/SOL L2 Order Book & Trades configs: - config_name: depth data_files: "depth/binance/*/*.parquet" - config_name: trades data_files: "trades/binance/*/*.parquet" - config_name: snapshots data_files: "snapshots/binance/*/*.parquet" --- # Binance BTC/ETH/SOL - L2 Order Book, Trades & Snapshots Continuous Level-2 order book (depth diffs), trades, and periodic full-book snapshots for BTCUSDT, ETHUSDT, and SOLUSDT, captured from Binance's public WebSocket feeds with [`crypto-lob-stream`](https://pypi.org/project/crypto-lob-stream/) and published monthly as a contribution to open market-microstructure research. Full depth-of-book data is paywalled or licensed for most asset classes; crypto is the exception, where the raw feeds are genuinely public. This dataset exists to lower that data barrier for independent researchers and students. ## Layout ``` depth/binance/{ASSET}/YYYY-MM.parquet # order book diff events trades/binance/{ASSET}/YYYY-MM.parquet # executed trades snapshots/binance/{ASSET}/*.parquet # full-book anchors for replay ``` Files are Snappy-compressed Parquet, compacted to one file per month per asset, and carry an explicit `exchange` column - i.e. the native schema of the `crypto-lob-stream` package, so its reconstruction helper works directly. ## Reconstructing the order book Depth rows are diffs, not a standing book. Replay a snapshot plus every subsequent diff, pruning to your intended depth after each update, to rebuild the book at any instant. The package does this for you, ghost-level-safe: ```python pip install crypto-lob-stream from crypto_lob_stream import reconstruct book = reconstruct("./depth", exchange="binance", asset="BTCUSDT") bids, asks = book.top(n=10) ``` ## Coverage & limitations - **Reconstructable from 2026-06-03 onward.** Every depth file here carries `first_update_id` / `last_update_id`, so the diff sequence can be replayed against the snapshots. Earlier data lacks sequence ids and is not published. - **Known gap — July 2026:** capture paused ~2026-07-05 20:56 to ~21:39 UTC (~43 min) for all three symbols across depth and trades, due to a host restart. A fresh snapshot was written on reconnect, so books before and after the gap reconstruct cleanly; do not replay a diff sequence across it. - Reconstruct each market on its own - never merge books across exchanges. - Check the diff sequence for continuity before replaying across a boundary.