Aperiodic/Markets from First Principles
Markets from First Principles/Part 3, Today's markets

Lesson 9 of 10

Three numbers for any market

The same asset trades on several venues. Where is it cheapest to trade, where is it deepest, and where is it hardest to move?

DMBy Daniel and Mark
12 min

So far: A stock perpetual trades on crypto venues around the clock, and while the stock's own market is shut, nothing outside the venue checks its price (lesson 8).

You have now met the costs a market order pays to the book. It crosses the spread (lesson 2), it walks up the book when it is bigger than the best ask (lesson 5), and it leaves the price moved behind it (lesson 6). The same coin often trades on several venues at once, each with its own book. This lesson turns those costs into three numbers you can read off any of them.

Three venues, one coin

Here is one coin on three venues. It is worth 100 dollars on all three, so a basis point is one cent, but their books differ. Venue A has the narrowest spread between its best bid and best ask, and little waiting at each price. B's spread is wider, with one big queue at its best ask and little behind it. C's spread is the widest, and the book behind its best ask is the thickest.

You want to buy. Set the size of your order and see what it pays on each.

Step 1 of 3

Change the size of your order. Watch how much of each book it eats, and which venue it costs least on.

$50k
Live: Buying $50k: cheapest on A
Paid on A
1.0 bps
Paid on B
3.0 bps
Paid on C
5.0 bps

The order fits in the first few prices of every book, so the spread is most of what it pays, and A has the narrowest.

Small orders go to A. They fit in its first few prices, so they pay little more than half its narrow spread: $50,000 costs 1 basis point above the mid on A, against 3 on B and 5 on C. At $500,000, A's thin book has run out of cheap prices, and B's big queue fills the whole order at 3. At $5 million every first queue is gone, and C, the venue with the widest spread, is cheapest by far: 9.9 basis points, against 22.8 on B and 50.5 on A. Which venue is cheapest depends on how much you trade.

Three numbers

You can't walk every venue's book before every order, and you rarely see the whole book anyway. What you want instead is a few numbers that sum up each book, each one a question you could ask of any market. Measure three of them on the same three books; the third buys $1M and watches where the mid ends up.

Step 2 of 3

Measure each number on all three books, and see which venue leads on each.

NumberABC
Costspread, bps of the mid, lower is better???
Depthdollars at best bid and ask, more is better???
Impactbps the mid moves per $1M, lower is better???

Nothing measured yet. Each button measures one number on all three books and fills in its row.

Cost is the spread in basis points of the mid: what you lose if you buy and sell again at once. A market order pays half of it, so lower is better, and A leads with 2.

Depth is the dollars waiting at the best bid and the best ask. It tells you roughly how big an order can be before it pays more than half the spread. More is better, and B leads with $1.2 million.

Impact is how far $1M of net buying moves the price, in basis points, and lower is better. It sees the book behind the best prices, which Depth can't. Behind B's big first queue the book is thin, so $1M moves its mid 2.5 basis points, while C's thick book holds it to 1.

No venue leads on all three, so which one matters depends on your order. The next figure shows where each takes over.

These are the three Aperiodic indices: the Cost Index, the Depth Index and the Impact Index. Each is worked out the same way for every perpetual it covers, so bitcoin, a small coin and a perpetual on Tesla or gold sit on one board. On real data the Impact Index doesn't push $1M into a book. It estimates Kyle's lambda from the trades themselves (lesson 6) and scales it to $1M of net taker flow.

The maths

For a book with best bid b and best ask a, sizes B and A waiting at them, and mid m = (a + b) / 2:

Cost = (a − b) / m × 10,000

Depth = b · B + a · A

With Kyle's lambda λ, the price return per coin of net taker buying, and the contract's price p:

Impact = λ × (1,000,000 / p) × 10,000

A market buy of Q dollars, filled in pieces of qi dollars at prices pi, pays above the mid:

Σ qi · (pi − m) / (Q · m) × 10,000

While the whole order fits at the best ask, that is Cost / 2.

Which number decides

To see where each number takes over, try every order size from $10,000 to $10 million and note the cheapest venue at each. Then make the queue at B's best ask bigger or smaller, and search again.

Step 3 of 3

Run the search from $10k to $10M and see where the cheapest venue changes. Then change the queue at B's best ask and run it again.

051015bps$10k$100k$1M$10M
$600k

Not searched yet. The search tries every order size from $10k to $10M on all three books.

The cheapest venue changes twice. Up to $250,000 the order fits in A's first prices and the spread is nearly all of what it pays, so the Cost decides. From there to about $1.6 million B wins, because its big first queue fills the order, or a large part of it, at 3 basis points: the Depth decides. Past that every first queue is used up, and what counts is how slowly the price climbs as you keep buying. The Impact decides, and C wins.

Give B a bigger queue and its stretch grows: with $1.5 million at its best ask, B stays cheapest up to $3.3 million. Past that, C still wins. Depth counts only the first queue on each side, and Impact is the number that tells you about the rest.

In real data

One bar of bitcoin, on all three

NumberOne barField
Cost0.0096 bpsspread_bps, bar from 14:00
Depth$1.55Mtotal_dollar_depth, bar from 14:00
Impact0.17 bps per $1Mkyle_like_lambda, minute from 14:38

The table holds the three inputs for Binance's bitcoin perpetual. In the five-minute bar from 14:00 UTC on 14 May 2025, the one from lesson 1, the spread was 0.0096 basis points: one tick of 10 cents on a coin at 103,805.65 dollars. About $1.55 million waited at the best bid and ask.

For impact, take the minute of trades from lesson 3, from 14:38 UTC on 11 June 2025. Its Kyle's lambda says each bitcoin of net taker buying moved the price 0.019 basis points. At that minute's close of 109,927 dollars, $1M is 9.1 bitcoin, so $1M of net buying moved it 0.17 basis points.

These are single bars, not the indices. Each index takes a contract's last day of five-minute bars: the Cost Index is the median of the day's spreads, the Depth Index the average of its dollars at the best prices, and the Impact Index the median of its lambda, in basis points per $1M. The live boards for Cost, Depth and Impact put bitcoin next to smaller coins and to perpetuals on US stocks and commodities. Each bar's spread and dollars at the best prices are in ƒL1 Liquidity, and its lambda in ƒImpact.

Binance BTC-USDT perpetual: the five-minute bar from 14:00 UTC on 14 May 2025 (lesson 1's bar), from Aperiodic's free sample, and the minute from 14:38 UTC on 11 June 2025 (lesson 3's minute), built from Aperiodic's raw trades. Prices in US dollars. Single bars, not the indices.

What you learned

Cost
The spread in basis points of the mid: what buying and selling again at once loses. A market order pays half. Lower is better.
Depth
The dollars waiting at the best bid and the best ask: roughly how big an order can be before it pays more than half the spread. More is better.
Impact
How far $1M of net taker buying or selling moves the price, in basis points. It sees the book behind the best prices. Lower is better.
Order size
Small orders pay mostly the spread. Orders bigger than the first queue pay for depth, and the biggest for impact.
Any market
The same three numbers compare venues, coins and stock perpetuals, because each means the same thing on any book.

Check yourself

  1. 1. Venue X has a spread of 2 bps and $50,000 at its best ask. Venue Y has a spread of 8 bps and $2 million at its best ask. Where does a $20,000 market buy cost less?

  2. 2. You want to buy $5 million on a venue whose best ask holds $500,000. Which number tells you most about what it will cost?

  3. 3. A market's Impact is 4 bps per $1M. Roughly how far does $1M of net buying move its price?

Lesson 9 of 10.

Next

Lesson 10: Behind the numbers

Why is market data so hard to get right, and how does bad data make a backtest lie?

Read lesson 10All 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. Three numbers for any market
  2. Three venues, one coin
  3. Three numbers
  4. Which number decides
  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