Market Microstructure Explained for Algo Traders

Most algo traders think in candles. Market microstructure researchers think in individual trades, quotes, and order events. The gap between these two perspectives is where most profitable strategies live.

The Bid-Ask Spread: Where Costs Hide

At any moment there are two prices: the best bid and the best ask. Every market order pays the spread — you buy at the ask, sell at the bid. For BTC/USDT, the spread is typically $1-10 depending on conditions. A backtesting system that ignores spreads overstates returns — sometimes enough to turn a profitable strategy into a losing one.

Aggressive vs Passive Orders

Every trade has two parties. One is passive (limit order, waited in the book). One is aggressive (market order, matched immediately). In tick data, is_buyer_maker = False means the buyer was aggressive — bullish pressure. is_buyer_maker = True means the seller was aggressive — bearish pressure.

Order Flow Imbalance

import polars as pl

df = pl.read_parquet("BTC_trades.parquet")

ofi = (
    df.with_columns([
        pl.when(pl.col("is_buyer_maker") == False)
          .then(pl.col("qty")).otherwise(-pl.col("qty"))
          .alias("signed_qty")
    ])
    .group_by_dynamic("time", every="1m")
    .agg(pl.col("signed_qty").sum().alias("ofi"))
)
print(ofi.head())

Positive OFI = buy-aggressive pressure. Negative = selling pressure. Invisible in OHLCV.

Tick-level BTC and ETH datasets with aggressor side — the raw material for microstructure research. → Browse the catalog

Summary

Market microstructure is the reality every live trading system operates in. Spreads cost money, aggressive order flow predicts short-term price direction, large orders move markets. None of this is visible in candles. All of it is visible in tick data.