CoolFace
Datasetpublic

rogerdehe/mktdata-binance-2026

BINANCE USDT Perpetual — L2 Order-Book Deltas + Trades (2026) Raw market-microstructure tick data for BINANCE USDT-margined perpetual futures: full-depth L2 order-book deltas and trades, as zstd-compressed Parquet. Recorded by the goldmine market-data recorder; converted losslessly from its internal GMKT v1 format. This repo holds year 2026. Data is sharded one repo per exchange per year (mktdata-binance-<year>) to keep per-repo file counts and size bounded. ⚠️ Under… See the full description on the dataset page: https://huggingface.co/datasets/rogerdehe/mktdata-binance-2026.

sourceHugging Facemitupdated 1d agoView on Hugging Face
0likes15kdownloads
Dataset Card

BINANCE USDT Perpetual — L2 Order-Book Deltas + Trades (2026)

Raw market-microstructure tick data for BINANCE USDT-margined perpetual futures: full-depth L2 order-book deltas and trades, as zstd-compressed Parquet. Recorded by the goldmine market-data recorder; converted losslessly from its internal GMKT v1 format.

This repo holds year 2026. Data is sharded one repo per exchange per year (mktdata-binance-<year>) to keep per-repo file counts and size bounded.

⚠️ Under construction / growing — this is a live recording, extended over time.

What's here

  • Deltas = incremental order-book updates (add / update / delete / clear).
  • Trades = individual executions.
  • Snapshots are inside the delta stream: every ~60s a full-book snapshot is spliced in as a burst of delta rows flagged F_SNAPSHOT. There is no separate snapshot table — filter flags & 32 to find them.

Layout

{SYMBOL}/{YYYY-MM}/{SYMBOL}_{YYYYMMDD}_deltas.parquet
{SYMBOL}/{YYYY-MM}/{SYMBOL}_{YYYYMMDD}_trades.parquet
{SYMBOL}/{YYYY-MM}/{SYMBOL}_{YYYYMMDD}_control.jsonl   (only when gaps/reconnects occurred)

One {SYMBOL} folder per instrument; one file per UTC day.

Schema

deltas.parquet — one row per order-book update:

columntypemeaning
actionuint81=add · 2=update · 3=delete · 4/5=clear
sideuint81=bid · 2=ask
price_raw / price_precint64 / uint8fixed-point; price = price_raw · 10^-price_prec
size_raw / size_precuint64 / uint8fixed-point; size = size_raw · 10^-size_prec
order_iduint64
flagsuint8bit 5 (value 32) = F_SNAPSHOT → row belongs to a periodic full-book snapshot burst
sequenceuint64
ts_event / ts_initint64exchange event time / local receive time, UTC nanoseconds

trades.parquet — one row per trade: price_raw/price_prec, size_raw/size_prec, aggressor (1=buy 2=sell), trade_id (string), ts_event, ts_init (UTC ns).

Price/size are stored as lossless fixed-point (raw + prec). Reconstruct a real value with raw * 10.0 ** -prec.

Usage

python
from huggingface_hub import hf_hub_download
import pandas as pd

p = hf_hub_download("rogerdehe/mktdata-binance-2026",
                    "BTCUSDT-PERP/2026-07/BTCUSDT-PERP_20260716_deltas.parquet",
                    repo_type="dataset")
df = pd.read_parquet(p)
df["price"] = df["price_raw"] * 10.0 ** -df["price_prec"]
snapshots = df[df["flags"] & 32 != 0]           # periodic full-book snapshots

Reconstruct the book at any time t: take the last snapshot burst before t (a CLEAR flagged F_SNAPSHOT, then its ADD rows) and replay deltas up to t.

Notes

  • Timestamps are UTC nanoseconds. The HF dataset viewer is disabled (custom per-symbol layout); load files directly.
  • Data provided as-is for research; no warranty of accuracy or completeness.