Aperiodic/Markets from First Principles
Markets from First Principles/Part 2, Pushing and paying

Lesson 3 of 10

Who's pushing

Every trade has a buyer and a seller. Which one moved the price, and was it a crowd or one big player?

DMBy Daniel and Mark
12 min

So far: A market maker quotes both sides and earns the gap between them, and the gap has to widen when more of the people trading know where the price is going (lesson 2).

Every trade has a buyer and a seller. Each sack bought is a sack sold, so a market can never have more buying than selling, counted in trades. Yet prices do rise when people are keen to buy. To see how, you have to ask of each trade which of the two chose to trade right then.

Who crossed

Go back to the board lesson 1 left behind, with the best bid at 51 and the best ask at 53. A maker pinned a note and waited. A taker arrived, read the board and took that note at its price. The trade needed both of them, but only the taker decided it should happen now, and crossed the spread to make it happen.

Exchanges record this. Next to each trade's time, price and size, the tape says which side the taker was on. In a taker buy, the buyer crossed and took a note at the best ask; in a taker sell, the seller crossed and took one at the best bid. Add them up over a minute and you get taker buy volume and taker sell volume. Buys minus sells is the ƒvolume delta.

Below, forty takers arrive at that board, each wanting one sack straight away, while makers keep two sacks waiting at every price. You choose how many of the takers are buying and how many selling, and watch the price.

Step 1 of 3

Set how many takers in every ten are buying, then send them in. Watch the price follow the gap between buys and sells.

3242526272price+80−8taker buys minus taker sells, so fartakers, in the order they arrive
5 of 10

No takers yet. 40 takers will each buy or sell one sack straight away, 5 in every ten of them buying.

Forty sacks change hands whatever you choose, so the volume is the same every time. With five buyers in every ten, takers bought 20 and sold 20, and the price ended at 52, where it started. With seven in ten, they bought 28 and sold 12, a volume delta of +16, and the price ended 10 higher, at 62.

Each taker buy removes a sack from the ask side. When buys outrun sells, the asks run out faster than makers replace them, and the best ask has to move up, taking the price with it. The volume says how much traded. The delta says which way the people in a hurry were leaning, and the price follows the lean.

A crowd or one big player

The same delta can come from very different people. Twenty-six sellers might each sell one sack, a few at a time, with buyers cutting in between them. Or one seller might want 12 sacks gone at once.

An order to sell 12 sacks takes the first note at the best bid, then the next, and keeps going down the board until it has all of them. The exchange prints one trade for every note it fills, so the tape shows 12 trades of one sack, all sells, all at the same moment, between the buys of everyone else.

Step 2 of 3

Switch between a crowd of sellers and one big seller. Both sell the same amount, so look at the runs on the tape.

4346495255orders, as they arrivethe tape, one square per trade2 buys in a row4 sells in a row
Live: A crowd: 40 takers, one sack each
Volume delta
−12
Longest buy run
2
Longest sell run
4
Run imbalance
−0.33

Most of the crowd sold, but buyers kept cutting in, so no run of sells lasted more than 4 trades.

Both tapes hold 14 taker buys and 26 taker sells, a volume delta of −12, and both leave the price at 45. Counted trade by trade, the sizes match too: every trade is one sack, because each fill is the size of the note it took. What gives the big seller away is the order of the trades.

A run is a streak of trades in a row whose takers were on the same side. In the crowd, the longest run of sells was 4 trades. The big seller's order printed 12 in a row. The ƒtrade run imbalance puts the longest run on each side against each other: the longest buy run minus the longest sell run, divided by the two added together. It goes from −1, when only sellers ever kept at it, to 1. The crowd's tape scores −0.33, the big seller's −0.71.

The maths

With Lbuy the longest run of taker buys in a bar and Lsell the longest run of taker sells:

run imbalance = (L_buy − L_sell) / (L_buy + L_sell)

The crowd: (2 − 4) / (2 + 4) = −0.33. The big seller: (2 − 12) / (2 + 12) = −0.71.

Flow that hurts

Lesson 2's stall lost money to customers who knew where the price was going. Those customers trade in a recognisable way: they all want the same side, and they come just before the price moves. So flow that piles up on one side while the price jumps around suggests that the people taking a market maker's notes know something. Market makers call such flow toxic, the word David Easley, Marcos López de Prado and Maureen O'Hara used for it in 2012.

The ƒflow toxicity score puts a number on it, a minute at a time. It takes two counts for the minute: the volume delta, and how much the price moved around inside the minute. It measures each against every minute of the day so far as a z-score, where 0 is an ordinary minute and 2 or −2 is far from ordinary. Then it multiplies the two.

Pick one of four minutes below and see where it lands on each count, against a toy morning of 30 ordinary ones.

Step 3 of 3

Try all four minutes. The score only grows when the orange square is far from the grey ones on both lines.

How one-sided: taker buys minus taker sells, in sacks

15 more sold15 more boughtaverageabout usual

z = −0.1: right by the average

How busy: how far the price moved around, in coins

02468 coinsaverageabout usual

z = 0.0: right by the average

How one-sided−0.1×How busy0.0=Flow toxicity score0
Live: Neither count is unusual
Volume delta
0 sacks
Price moved around
3 coins
The score points to
Neither side

Takers bought as much as they sold, and the price moved around the usual amount, so the score is 0.

Take a minute when takers sold 12 sacks more than they bought: far from usual, a z-score of −2.8. If its price moved around an ordinary 3 coins, a z-score of 0.0, the score comes to 0. If its price moved around 6 coins, a z-score of 2.5, the score drops to −7. A large score needs both: flow leaning hard to one side, in a minute when the price is busier than usual. Then the sign says who was pushing, below zero for sellers and above zero for buyers.

The maths

For each minute, with d its taker buys minus taker sells and r each trade-to-trade return inside it:

busyness v = √(Σ r²)

z(x) = (x − mean) / standard deviation, over the day's minutes so far, this one included

flow toxicity score = z(d) × z(v)

In real data

A minute when the sellers pushed

From 14:38 to 14:39 UTC on 11 June 2025, takers on Binance's bitcoin perpetual sold $68.0 million and bought $25.1 million, a volume delta of −$42.9 million, across 11,692 trades. The price fell from 110,169.3 to 109,927.0 dollars. Point at the chart to follow the two together.

Loading the minute's trades
  • price
  • taker buys minus taker sells, so far
  • a millisecond with $1 million or more of taker selling

The selling came in bursts. In 13 separate milliseconds, takers sold $1 million or more and bought nothing, between 24 and 194 trades at a time: $22.5 million in all, a third of the minute's selling. Each looks like one large order filling a long line of waiting notes at once. The longest run of sells was 339 trades and the longest run of buys 124, a run imbalance of −0.46.

Against the day's 879 minutes up to and including it, the minute's volume delta was 6.3 standard deviations below average, and only one minute that day had more net selling. Its price moved around ten times as much as the day's average minute, but that counts as only 1.9 standard deviations: five minutes earlier that day had moved even more, the wildest at 12:30 UTC, and they widen the standard deviation it is measured in. Multiply the two and the flow toxicity score for the minute was −11.8.

Every minute's taker buys and sells, volume delta and toxicity score are in ƒFlow Metrics, and its runs in ƒTrade Run Structure.

Binance BTC-USDT perpetual, all 11,692 trades from 14:38 to 14:39 UTC on 11 June 2025, from Aperiodic's raw trades, with the flow and run outputs for that minute and the 879 minutes of the day up to it. Prices in US dollars.

What you learned

Taker buy, taker sell
A trade where the buyer crossed the spread and took an ask, or where the seller crossed it and took a bid.
Volume delta
Taker buys minus taker sells. The price follows the delta, not the volume.
Run
A streak of trades in a row whose takers were all on the same side.
Trade run imbalance
The longest buy run against the longest sell run, from −1 to 1. One large order shows up as one long run.
Flow toxicity score
A minute's volume delta and how much its price moved around, each against the day so far, multiplied. Large when the flow leans hard while the price is busy.

Check yourself

  1. 1. In one minute, takers bought 30 bitcoin and sold 50. What was the volume delta?

  2. 2. One order sells 12 sacks against a board with one sack on each note. How many trades does the tape show?

  3. 3. Which minute gets the most negative flow toxicity score?

Lesson 3 of 10.

Next

Lesson 4: What the candle leaves out

What does a five-minute candle throw away?

Read lesson 4All lessons

Your progress stays in this browser. A free account keeps it on any device and lets you pull the data behind these lessons yourself: every metric for 2025 on BTC, ETH, SOL and 10 RWA perps, on an API key of your own. Get the data

Read every lesson on one page

12 min left
  1. Who's pushing
  2. Who crossed
  3. A crowd or one big player
  4. Flow that hurts
  5. In real data
  6. What you learned
  7. Check yourself
Aperiodic

Built from hundreds of terabytes of raw data and distilled into point-in-time metrics you can pull as parquet files. Plus the raw trades, quotes and derivatives data behind them.

Use Cases
  • Improve your backtest
  • Find new alpha
  • Execute smarter
Indices
  • All indices
  • Aperiodic Cost Index
  • Aperiodic Depth Index
  • Aperiodic Impact Index
Metrics
  • Metrics library
  • Data Catalog
  • Free data
  • Live markets dashboard
  • Every perp, A–Z
  • Global Liquidity
  • Unusual activity
  • Order Flow
  • L1 & L2
  • Derivatives
  • RWA
  • Live funding rates
  • Raw Data
Developers
  • Docs
  • API Docs
  • MCP Server
  • Notebooks
  • Integrations
  • For AI Agents
  • Atlas Security Master
  • TParquet
  • Binance OI history API
  • OKX history APIs
  • Pre-flight
  • Changelog
  • Roadmap
  • llms.txt
Learn
  • Markets from First Principles
  • Replays
  • Microstructure Guide
  • Architecture
  • Research Blog
  • FAQ
Compare
  • All vendors
  • Pricing compared
  • vs. Tardis
  • vs. CoinGlass
  • vs. Kaiko
  • vs. Amberdata
  • vs. Crypto Lake
  • vs. Laevitas
  • vs. Coinalyze
  • vs. Binance public data
  • vs. Hyperliquid data
  • Binance archive
  • Hyperliquid data
Company
  • Team
  • Pricing
  • Contact
  • Book a call
  • Terms of Service
  • Privacy Policy
  • Licensing
  • SLA

© Copyright 2026 Aperiodic. All Rights Reserved.

Aperiodic Limited · Registered in Ireland · Company No. 815273 ·
136 Capel Street, Dublin D01 T2C9, Ireland