--- language: - en license: cc-by-4.0 task_categories: - time-series-forecasting - other tags: - bitcoin - btcusdt - crypto - trading - finance - binance - parquet - high-frequency - market-microstructure pretty_name: "Crypto Market Data Lake (Binance + Alt Data)" size_categories: - 100G ⭐ If you use this dataset in research, a product, or any publication, > please **cite the author** (see [Citation](#citation) below). > It took significant infrastructure and months of collection effort — > a citation is the simplest way to give credit. A continuously growing data lake of crypto market microstructure data sourced from Binance and alternative data providers. Currently covers **BTCUSDT** from **August 2017 → April 2026** — nearly a full decade of tick-level data. Additional symbols (ETHUSDT, SOLUSDT, BNBUSDT …) will be added in future releases. > **Version `v202618`** — BTCUSDT full history, April 2026 snapshot. All files are compressed **Parquet (Snappy)**, sized **50–300 MB** each for efficient streaming and DuckDB / pandas compatibility. All timestamps are **int64 milliseconds UTC**. --- ## Datasets included | Dataset | Market | Coverage | Granularity | Rows (approx) | |---------|--------|----------|-------------|---------------| | Aggregate trades | Spot | Aug 2017 – Apr 2026 | Every trade | ~16 billion | | Aggregate trades | Futures UM | Jan 2020 – Apr 2026 | Every trade | ~9 billion | | Klines (OHLCV 1m) | Spot | Sep 2017 – Apr 2026 | 1-minute bars | ~4.5 M | | Klines (OHLCV 1m) | Futures UM | Sep 2019 – Apr 2026 | 1-minute bars | ~3.5 M | | Funding rates | Futures UM | Sep 2019 – Apr 2026 | Every 8 h | ~7,200 | | Open interest | Futures UM | Apr 2026 | Hourly | ~720 | | Premium index | Futures UM | Apr 2026 onwards | 1-minute | growing | | Fear & Greed index | — | Apr 2026 onwards | Daily | growing | | Deribit BTC DVOL + options | — | Apr 2026 onwards | 15-minute | growing | | Macro (DXY, SPX, Gold, US10Y) | — | Apr 2026 onwards | Daily | growing | > **Note**: Futures aggregate trades for Sep–Dec 2019 are unavailable > from all Binance public sources (vault returns 404); those months are > omitted. ## File layout ``` raw/ agg_trades/ market={spot,futures}/symbol=BTCUSDT/year=YYYY/month=MM/ {start_ms}_{end_ms}.parquet ← 50–300 MB each klines/ market={spot,futures}/symbol=BTCUSDT/interval=1m/year=YYYY/month=MM/ {start_ms}_{end_ms}.parquet funding_rates/symbol=BTCUSDT/year=YYYY/month=MM/ open_interest/symbol=BTCUSDT/year=YYYY/month=MM/ premium_index/symbol=BTCUSDT/year=YYYY/month=MM/ alternative_me/fear_greed/year=YYYY/ deribit/year=YYYY/month=MM/ macro/{dxy,spx,gold,us10y}/year=YYYY/ ``` ## Schemas ### agg_trades | Column | Type | Description | |--------|------|-------------| | agg_id | int64 | Binance aggregate trade ID | | price | float64 | Trade price (USDT) | | quantity | float64 | Trade quantity (BTC) | | first_trade_id | int64 | First raw trade in the aggregate | | last_trade_id | int64 | Last raw trade in the aggregate | | timestamp | int64 | Execution time (ms UTC) | | is_buyer_maker | bool | True = seller is aggressor | | symbol | string | BTCUSDT | | market | string | spot | futures | ### klines | Column | Type | Description | |--------|------|-------------| | open_time | int64 | Bar open (ms UTC) | | open / high / low / close | float64 | OHLC prices (USDT) | | volume | float64 | Base volume (BTC) | | close_time | int64 | Bar close (ms UTC) | | quote_volume | float64 | Quote volume (USDT) | | trades | int32 | Trade count in bar | | taker_buy_base | float64 | Taker buy base volume | | taker_buy_quote | float64 | Taker buy quote volume | | symbol | string | BTCUSDT | | interval | string | 1m | | market | string | spot | futures | ### funding_rates | Column | Type | Description | |--------|------|-------------| | timestamp | int64 | Funding time (ms UTC) | | funding_rate | float64 | Rate applied | | funding_time | int64 | Funding settlement time (ms UTC) | | symbol | string | BTCUSDT | ## Quick-start (DuckDB) ```python import duckdb # Spot aggregate trades for 2021 — full year, fast scan df = duckdb.sql(""" SELECT date_trunc('hour', to_timestamp(timestamp/1000)) AS hour, sum(quantity * price) AS usd_volume, count(*) AS trade_count FROM read_parquet( 'raw/agg_trades/market=spot/symbol=BTCUSDT/year=2021/**/*.parquet', hive_partitioning=true ) GROUP BY 1 ORDER BY 1 """).df() # All-history 1-minute klines (spot) klines = duckdb.read_parquet( 'raw/klines/market=spot/symbol=BTCUSDT/interval=1m/**/*.parquet', hive_partitioning=True ) ``` ## Data sources | Source | Used for | URL | |--------|----------|-----| | **Binance REST API** (`/api/v3/aggTrades`, `/fapi/v1/aggTrades`) | Aggregate trades 2022–2026 | [docs.binance.com](https://docs.binance.com/) | | **Binance Data Vault** (monthly ZIP archives) | Aggregate trades 2017–2021 | [data.binance.vision](https://data.binance.vision/) | | **Binance REST API** (`/api/v3/klines`, `/fapi/v1/klines`) | OHLCV klines all history | [docs.binance.com](https://docs.binance.com/) | | **Binance REST API** (`/fapi/v1/fundingRate`) | Funding rates | [docs.binance.com](https://docs.binance.com/) | | **Binance REST API** (`/futures/data/openInterestHist`) | Open interest (30-day window) | [docs.binance.com](https://docs.binance.com/) | | **Binance WebSocket** (spot + futures public streams) | Live klines + trades | [docs.binance.com](https://docs.binance.com/) | | **Deribit REST API** (public) | BTC DVOL + options market | [docs.deribit.com](https://docs.deribit.com/) | | **alternative.me Fear & Greed API** | Fear & Greed index | [alternative.me/crypto/fear-and-greed-index](https://alternative.me/crypto/fear-and-greed-index/) | | **Yahoo Finance** (`yfinance`) | DXY, SPX, Gold, US10Y macro | [finance.yahoo.com](https://finance.yahoo.com/) | ## Collection methodology Built and maintained by **Eimantas Kulbe** using a custom Python pipeline running on four VPS nodes with rotating HTTP proxy pools to handle Binance rate limits without API keys. - **Pre-2022 aggregate trades**: downloaded from the Binance Data Vault monthly ZIP archives; parsed with DuckDB for out-of-core efficiency - **2022–2026 aggregate trades**: collected via Binance REST API using 1-hour time-range windows, distributed across workers with modulo assignment - **Klines / Funding rates / OI**: Binance REST API, full history - **Real-time data**: Binance WebSocket public streams (no API key required) - **Alt data**: Deribit REST, alternative.me, Yahoo Finance — polled every 15 minutes to 1 hour Infrastructure: all writes are idempotent with a PostgreSQL chunk-log tracking every hourly window (`done | skipped | failed`). Schema version `1` is embedded in every Parquet file's metadata for forward-compatibility. ## Known gaps | Gap | Reason | |-----|--------| | Futures agg_trades Sep–Dec 2019 | Binance Data Vault returns 404; no public source exists | | Isolated zero-trade hours (early 2017) | Genuine gaps in exchange history | ## License This dataset is released under the **[Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/)** license. You are free to **share**, **adapt**, and use this data for **any purpose including commercial**, as long as you give appropriate credit to the author. > ⚠️ **Attribution is required.** If you use this dataset, you must cite > **Eimantas Kulbe** as the author. See the [Citation](#citation) section below. ## Citation If you use this dataset in academic work, a commercial product, a blog post, or any other publication, **please cite it**. This is a large-scale data collection effort and proper attribution helps sustain open data projects. **BibTeX:** ```bibtex @dataset{kulbe_btcusdt_2026, author = {Kulbe, Eimantas}, title = {Crypto Market Data Lake (Binance + Alt Data)}, year = {2026}, publisher = {HuggingFace Datasets}, url = {https://huggingface.co/datasets/KEDevO/crypto-market-datasets}, license = {CC BY 4.0}, note = {Contains aggregate trades, OHLCV klines, funding rates, open interest, and alternative data for BTCUSDT on Binance, covering August 2017 to April 2026.} } ``` **APA:** > Kulbe, E. (2026). *Crypto Market Data Lake (Binance + Alt Data)* [Data set]. > HuggingFace Datasets. https://huggingface.co/datasets/KEDevO/crypto-market-datasets **Acknowledgement (for papers):** > The cryptocurrency market data used in this work was sourced from the > *Crypto Market Data Lake* compiled by Eimantas Kulbe (2026), available at > https://huggingface.co/datasets/KEDevO/crypto-market-datasets > under CC BY 4.0. --- *Dataset compiled and maintained by [Eimantas Kulbe](https://huggingface.co/KEDevO). For issues or questions, open a discussion on the dataset page.*