2b. Market Data: What You Feed the Machine
Klines, quote ticks, trade ticks, orders, and the order book are five different recordings of the same market. Before you can backtest a strategy, you must know which recording it needs — and why a market maker cannot survive on candles.
Chapters 1 and 2 described the market as a place — a book of bids and asks, painted into candles. This chapter describes it as data: the actual records a venue hands you and a backtester consumes. The distinction is not academic. Pick the wrong recording and your strategy either can't be tested or lies to you — the single most common way a first backtest fails is feeding it data that doesn't contain what the strategy needs to read.
There are five recordings of the same underlying reality. They differ in one axis above all: how much of the truth they keep, versus throw away.
The order book — the ground truth
Everything else is derived from this. The limit order book (Chapter 1) is the live, complete list of every resting order: every price level, the size waiting there, on both sides. As data, a book snapshot (or "L2 / depth" feed) is a record like:
It is the richest and heaviest recording — the only one that shows depth (how much size rests away from the touch) and lets you reason about queue position (Chapter 7). A full-fidelity feed streams every add, cancel, and fill (the "L3 / MBO" — market-by-order — view). This is the truth from which klines, quotes, and trades are all just summaries.
Quote ticks — the top of the book, live
A quote tick (best-bid-offer, "BBO") is a snapshot of just the top of the book: the best bid, the best ask, and the size available at each, stamped the instant either one changes.
It throws away depth beyond the touch but keeps the two numbers that define a tradeable market: what you can buy at and sell at, right now. Quotes update many times per second. The gap between bid and ask is the spread — and that gap is the market maker's entire revenue model. A quote tick is the smallest record that still contains a spread.
Trade ticks — what actually executed
A trade tick is a single completed transaction: price, quantity, timestamp, and which side was the aggressor (did a taker lift the ask, or hit the bid?).
Trades are the finest-grained record of what happened — the raw stream that klines are literally built from by bucketing into intervals. They tell you the exact price and size of every fill and the direction of aggression (the basis of order-flow signals, Chapter 7). But note what a trade tick does not contain: the bid and ask that stood on either side of it. A trade tells you where a deal closed, not the live quotes around it. Trades ≠ quotes.
Klines (bars/candles) — a minute, compressed to five numbers
A kline — candlestick, bar — takes every trade in a fixed window and keeps only five numbers: open, high, low, close, volume (Chapter 2). Everything else about the minute is discarded.
This is the most compressed recording — and by far the most common, because it is small, free, and universally available. It answers "where did price go this minute?" perfectly. It cannot answer "what is the spread?", "how deep is the book?", or "was that fill a buy or a sell?" — those questions were averaged away the moment the bucket closed. A kline has no bid and no ask. That single absence is why the strategy you can build on it is directional, never spread-based.
Orders — your side of the conversation
The four above are what the market tells you. An order is what you tell the market — the fifth record, flowing the other way. A limit order ("rest 0.5 BTC to buy at 97430"), a market order ("buy 0.5 now"), or any of the richer types from Chapter 2 (post-only, IOC, stop). Your orders enter the same book as everyone else's; when one fills, the venue sends you back a fill (an execution report) — which, from the outside, looks exactly like a trade tick. The loop closes: you read quotes and book, you emit orders, the book emits trades, and the cycle repeats.
Which recording does your strategy need?
The practical question. Match the strategy's question to the recording that can answer it:
| Recording | Keeps | Good for | Cannot do |
|---|---|---|---|
| Order book (L2/L3) | every level & size, both sides | market making, depth/queue signals, HFT, realistic fills | heavy; often paid; hard to store |
| Quote ticks (BBO) | best bid, best ask, sizes | market making, spread capture, trailing stops, realistic backtests | no depth beyond the touch |
| Trade ticks | every fill: price, size, side | order-flow signals, tick strategies, better fill realism | no live bid/ask; not a spread |
| Klines / bars | OHLCV per interval | directional strategies (EMA, trend, mean-reversion), charting, most retail backtests | no spread, no depth, no side — useless for MM |
| Orders / fills | your intents & executions | your P&L, position, and execution audit | describes you, not the market |
Where crypto data comes from — and what's free
Because this book's practical chapters use Binance (Chapter 12), one distinction is worth burning in now:
- Klines and trades are free and historical. Binance's public archive (Binance Vision) publishes years of both. This is what you download to backtest a directional strategy.
- Quotes and order-book history are not free from Binance. The archive contains no historical bid/ask. To backtest a market maker on real quotes you either pay a tick-data vendor, or synthesize quotes from bars/trades (a modeled spread — only as honest as the model).
- Live quotes and the live book are free — over Binance's real-time WebSocket. So a market maker can paper-trade on free live quotes even though it cannot cheaply backtest on historical ones.
2. The Trader's Toolkit: Candles, Timeframes & Indicators
Every trading platform speaks the same visual language: candlesticks, moving averages, volume, timeframes. A market maker must be bilingual — fluent in the chart, and fluent in the order flow hiding underneath it.
3. What Is a Market Maker?
A merchant of immediacy: always willing to buy, always willing to sell, and paid the spread for never saying no.