ibrahimdaud/binance-btcusdt
BTCUSDT Perpetual Futures — 5-Minute Feature Dataset Complete historical dataset for Binance BTCUSDT USDT-Margined Perpetual Futures, covering 2020-09-10 → 2026-05-31 (~5.7 years, 601,920 five-minute bars). Built for quantitative research and ML model training. All raw data is sourced from data.binance.vision (Binance's official public archive) and processed with a deterministic, event-driven feature pipeline. Repository structure features/ BTCUSDT/… See the full description on the dataset page: https://huggingface.co/datasets/ibrahimdaud/binance-btcusdt.
BTCUSDT Perpetual Futures — 5-Minute Feature Dataset
Complete historical dataset for Binance BTCUSDT USDT-Margined Perpetual Futures, covering 2020-09-10 → 2026-05-31 (~5.7 years, 601,920 five-minute bars).
Built for quantitative research and ML model training. All raw data is sourced from data.binance.vision (Binance's official public archive) and processed with a deterministic, event-driven feature pipeline.
Repository structure
features/
BTCUSDT/
2020-09-10.parquet # 288 rows — one per 5-min bar
2020-09-11.parquet
...
2026-05-31.parquet
raw/
klines_1m/BTCUSDT/ # 1-minute OHLCV bars
klines_5m/BTCUSDT/ # 5-minute OHLCV bars
bookDepth/BTCUSDT/ # L2 order-book depth snapshots (from 2023-01-01)
metrics/BTCUSDT/ # Open interest, long/short ratios
aggTrades/BTCUSDT/ # Tick-level aggregated trades (~17 GB, optional)Quick start
import polars as pl
from huggingface_hub import snapshot_download
# Download only the feature files (120 MB) — skip raw data
local_dir = snapshot_download(
repo_id="ibrahimdaud/btcusdt-futures-features",
repo_type="dataset",
ignore_patterns=["raw/*"],
)
# Load all feature bars into a single DataFrame
df = pl.read_parquet(f"{local_dir}/features/BTCUSDT/*.parquet")
print(df.shape) # (~601920, 27)
print(df.dtypes)Or load a single day:
df = pl.read_parquet(f"{local_dir}/features/BTCUSDT/2024-01-15.parquet")Feature schema (27 columns)
Identity
Price features
Null policy:log_ret_15m/log_ret_60marenullfor the first 3 / 12 bars of the dataset (insufficient history). All other price features are available from the first bar.
Volume / taker-flow features
Order book depth
Sourced from Binance bookDepth snapshots (available from 2023-01-01 onward). Each snapshot covers cumulative depth in percentage-price bands around mid.
Note on 0.2% band: Binance's bulk bookDepth export does not populate the ±0.2% band (bid_02pct/ask_02pctare always null in the source files). Those columns were therefore excluded from this dataset entirely.
VPIN (Volume-Synchronized Probability of Informed Trading)
Implementation follows Easley et al. (2012). Trade-flow is classified using the bulk-volume method (no tick test needed).
Parameters used: bucket_btc = 100, window = 50 (≈65 minutes of flow at average volume).
Hawkes process intensities
Trades are modelled as a bivariate Hawkes process. Each buy or sell trade excites future arrivals of its own kind. The intensity at time t is:
λ_buy(t) = μ + α × Σ_{t_i < t, buy} exp(−β × (t − t_i))
λ_sell(t) = μ + α × Σ_{t_j < t, sell} exp(−β × (t − t_j))Parameters used: α = 1.0, β = 10.0 /s (decay half-life ≈ 70 ms), μ = 6.0 trades/s.
Market structure (from Binance futures metrics endpoint)
5-minute snapshots of open interest and long/short positioning. Small data gaps exist around 2022 Q1 (128 days for taker_ls_vol_ratio, 19 days for ls_count_ratio).
Forward targets (ML labels)
Filled post-hoc from future bars. The last few bars of the dataset have null targets (no future data to look forward to).
Raw data schemas
raw/klines_1m/ and raw/klines_5m/
Standard Binance OHLCV kline format.
raw/aggTrades/
Each row is one aggregated trade (all fills of a single taker order).
raw/bookDepth/
L2 depth snapshots at ±1%, ±2%, ±3%, ±4%, ±5% price bands from mid. Available from 2023-01-01.
raw/metrics/
Binance futures 5-minute metrics snapshot.
Data coverage summary
Reproducing this dataset
All feature computation code is open-source:
git clone https://github.com/ibrahimdaud/quant-hack
cd quant-hack
uv sync
# 1. Download raw data from data.binance.vision
uv run intraday data download --start 2020-09-10 --end 2026-05-31
# 2. Compute features (16 parallel workers, ~20 min on 16-core machine)
uv run intraday features compute --start 2020-09-10 --end 2026-05-31 --workers 16Citation
If you use this dataset in research, please cite:
@dataset{btcusdt_futures_features_2026,
title = {BTCUSDT Perpetual Futures 5-Minute Feature Dataset},
author = {ibrahimdaud},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/ibrahimdaud/btcusdt-futures-features},
note = {2020-09-10 to 2026-05-31, sourced from data.binance.vision}
}License
MIT — free to use for research and commercial purposes. Data originally sourced from Binance's public archive (terms).
