Low-Latency Trading Solutions
CART
Training data

Training Data for AI & Machine-Learning Trading Models — Crypto Order Books, Trades and Event Contracts

Models learn from what happened between the candles: every order placed, changed and cancelled, every trade with its aggressor side, and — on Kalshi and Polymarket — the settlement that labels each window. The CryptoStruct archive records every message of each venue's public feed, co-located and unsampled, in one schema across 35+ venues, and sells it per instrument-day with a free Python reader that turns a day file into a Parquet dataset in one command.

Venues
32
Instruments
319,715
Labeled series
1,866
Coverage
February 2021 – September 2026
Trades / day
634.1M
Turnover / day
$188.5B
Why tick data

What a model sees in tick data that candles hide

Every message, not bar summaries

The complete venue feed as recorded: every Level-2 snapshot and update, every trade, quote, funding and liquidation event — queue size, imbalance, spread and cancellations are features in the data, not lost in aggregation.

Labels built into the market

Every Kalshi and Polymarket up/down window settles: a 5-minute series yields 288 labeled windows per day, and the last print of each contract implies the outcome the model must learn to anticipate.

One schema across 35+ venues

A parser written for a Binance perpetual reads Deribit options and Kalshi contracts unchanged — one feature pipeline for spot, derivatives, options and event contracts.

Nanosecond, co-located timestamps

Venue timestamp and our receive time at the venue on every event, so latency-aware features and leak-free alignment of book and tape are possible.

Dataset size

How big a training set is — rows, windows and bytes

Across the whole archive our capture records about 634.1M trade prints per UTC day (19.0B in the 30 days to 2026-09-16, $5.7T of USD turnover across 31 venues) — every one of them a labelled event with its side, size, price and the order-book state around it. The rows below are what a single instrument contributes.

DatasetPer dayPer yearNotes
L2 book grid, 20 levels, 1-second sampling86,400 rows31.5 M rowsper instrument; the reader writes it as one Parquet file per day
L2 book grid, 20 levels, 100-millisecond sampling864,000 rows315 M rowsper instrument; choose the grid from the horizon you predict
Raw events, Binance BTCUSDT perpetualtens of millionsbillions1–2 GB compressed per day — stream it, never load it whole
Raw events, BitMEX XRPUSDT perpetual1.87 M~680 M59 MB compressed per day, 1.83 M of them book updates
Labeled windows, 5-minute up/down series288105,120e.g. Polymarket BTC 5m: ~577 contract files and ~554k trades per day
Labeled windows, 15-minute / hourly series96 / 2435,040 / 8,760the label budget is fixed by the market clock, not by your features
Labels & leakage

Where the labels come from — and how not to leak them

For crypto instruments the label is yours to define — a forward mid-price move over a horizon with a dead-band, the sign of the next N-second return, whether a level gets consumed — and the L2 grid gives you the inputs at any sampling rate. Because every event carries both the venue timestamp and the co-located receive timestamp, features can be built strictly from information available before the label's start, which is where most leakage in published crypto models comes from.

For event contracts the label comes with the data: every Kalshi and Polymarket up/down window settles, and the last print of a contract implies the outcome (in our statistics a close at or above 0.97 reads as Yes/Up, at or below 0.03 as No/Down — always described as "implied", the venue's official resolution is a separate record you should join). A 5-minute series produces 288 labeled windows per UTC day, 105,120 per year; the training-data guide works through that budget, walk-forward splits and the purge/embargo needed around each window.

Split by time, never at random: adjacent windows share regime and order flow, and a random split leaks that structure across train and test. Trim the ~8-minute overlap at the start of every day file before concatenating days, audit each file (stats FILE --deep: parse errors, chain gaps, crossed states, coverage close to 86,400 s) and drop grid rows flagged suspect before drawing conclusions from microstructure features.

Pipeline

From day files to a Parquet dataset in two commands

The free reader from the AI toolkit streams a multi-gigabyte day file and writes a fixed-grid order-book table or the trade tape as Parquet; polars or pandas takes it from there. Days are independent, so the conversion parallelizes trivially.

# one Parquet order-book grid per day: 20 levels, sampled every second
for f in data/*.txt.zst; do
  out="parquet/book_$(basename "$f" .txt.zst).parquet"
  [ -f "$out" ] || python3 cryptostruct_reader.py book "$f" --every 1s --depth 20 --out "$out"
done

# trades of the same days, for flow features and labels
for f in data/*.txt.zst; do
  out="parquet/trades_$(basename "$f" .txt.zst).parquet"
  [ -f "$out" ] || python3 cryptostruct_reader.py trades "$f" --out "$out"
done
import polars as pl

book = pl.scan_parquet("parquet/book_*.parquet")
# columns: ts, mid, spread, spread_bps, bid_px_1..20, bid_qty_1..20,
#          ask_px_1..20, ask_qty_1..20, n_events, suspect
feat = (
    book.filter(pl.col("suspect") == 0)
        .with_columns(
            imb1=(pl.col("bid_qty_1") - pl.col("ask_qty_1"))
                / (pl.col("bid_qty_1") + pl.col("ask_qty_1")),
            micro=(pl.col("bid_px_1") * pl.col("ask_qty_1") + pl.col("ask_px_1") * pl.col("bid_qty_1"))
                / (pl.col("bid_qty_1") + pl.col("ask_qty_1")),
        )
        .with_columns(y=(pl.col("mid").shift(-60) / pl.col("mid") - 1))  # 60 s forward return
)
df = feat.collect()

The full walkthrough — grid choice, features, labels, splits and audit — is the order-book dataset guide.

How to

How to assemble and buy a training set

  1. Start with the free samples: a pinned high-volatility Bitcoin day (Binance BTCUSDT perpetual, 2026-07-06, ~1.5 GB), rolling full days on major venues and the busiest Kalshi and Polymarket contracts of the day are on the downloads page — build the pipeline against them before buying anything.
  2. Size the set from the label budget, not from gigabytes: pick the instruments and the number of days that give you enough independent labeled windows, then buy exactly those instrument-days in the Data Shop at €1 each, or whole series-days of an event-contract family on the bundles page.
  3. Buy in bulk when the set is large: "Select to buy" in the instrument scanner adds a shared date window across many instruments, credit packs bring the effective per-day price down (€100 → 140 credits · €250 → 375 credits · €1,000 → 1,750 credits) and never expire, and Premium adds 50 credits a month for €20.
  4. Download everything you own as a batch ZIP from your account, bundle days as one archive each, or date ranges as one resumable tar; convert with the free reader (grids, trades, funding, greeks to Parquet) or use ?format=trades.parquet directly on the download link.
  5. Let an agent do it: the Agent Skill teaches Claude Code or Cursor the format and recipes, and the MCP server searches instruments and bundles, previews and — with your consent — buys and downloads on your behalf.
Usage

What you may do with the data

Purchased data is for your own use — backtesting, research, analytics and training your own models, in-house or in your own products; the trained models and derived data you build from it are yours. The raw files and tick streams themselves may not be redistributed, resold or published. The full terms are on the data license page.

The archive itself — venues, message types, prices and bulk delivery — is described on the historical data overview.

FAQ

Training data — FAQ

Can I train AI or machine-learning models on this data?

Yes — purchased data may be used in-house for research, backtesting and training your own models, and the trained models and derived analytics are yours. The raw files and tick streams themselves may not be redistributed, resold or published.

Why is tick data better training data than OHLCV candles?

Candles summarize a bar and discard the order book, the sequence of trades and every cancellation. Tick files keep the full Level-2 evolution and every print with its aggressor side and nanosecond timestamps, so imbalance, microprice, depth, spread dynamics and trade flow are features in the data, and labels can be aligned to the exact moment information became available.

Are the datasets labeled?

Event-contract data is: every Kalshi and Polymarket up/down window settles, so each window is a labeled example — a 5-minute series yields 288 per day — with the outcome implied by the last print in our statistics and the official resolution as the authoritative label. Crypto order-book and trade data is unlabeled; forward returns or level-consumption labels are built from the same file.

How much training data does a trading model need?

Count independent labeled windows, not gigabytes: a 5-minute up/down series gives 105,120 windows per year, a 15-minute series 35,040, an hourly one 8,760, and for crypto instruments an L2 grid at one second yields 86,400 rows per instrument-day. The up/down training-data guide works through the arithmetic and the walk-forward splits.

Is the data available as Parquet or CSV?

Yes — every free sample and every purchased tick day exports as gzipped CSV or Parquet at no extra cost: trades and liquidations (derivatives, 2026 onward) in both formats, top-of-book quotes as CSV where the venue publishes a BBO stream, with integer microsecond UTC timestamps. Order-book grids at any sampling rate come out of the free reader as Parquet; the native files stay zstd-compressed JSON lines with nanosecond timestamps.

How much does a training set cost?

€1 per instrument-day and series-day bundles from €1 per day, no minimum; credit packs (€100 → 140 credits · €250 → 375 credits · €1,000 → 1,750 credits) never expire, and Premium adds 50 credits a month for €20. A year of one liquid perpetual is 365 instrument-days; a year of a 5-minute event-contract series is 365 series-days holding every contract of every window.