Order flow is the record of what was offered, what was hit and what was lifted. It arrives as two files: a snapshot of the resting book, with a price and a size at each level on each side, and a tape of executed trades, with a price, a size and a timestamp for each print. Both are facts about the past, recorded to the tick. Both are routinely read as though they were statements about intention, which they are not.
The distinction matters because the arithmetic is genuinely useful and the inference on top of it usually is not. A book tells you the spread you will pay, the depth available at each price, and what a given order size will cost to execute — all of it measurable, all of it reproducible from the same snapshot. A tape tells you how much volume traded and, with a rule, which side crossed the spread. Neither tells you why. A displayed order can be withdrawn; an aggressive print can be one parent order chopped into forty; the participant behind either is not in the file.
What follows is the arithmetic of a read: the four records and the formulas that turn them into numbers, one book worked through with the derived figures (spread, mid, microprice, depth imbalance) and the cost of a trade walked level by level, a tape of seven prints where the side classification is shown to move the answer, and the list of things the data cannot show. There is no claim here about direction, and none about intent.
Four records, four formulas
An order-flow read draws on four kinds of record, and each has a formula that can be written down and checked.
The book. A snapshot of resting orders: price and size at each level, on each side. From it come the spread (best ask minus best bid), the mid (the average of the two), the depth at any number of levels (the sum of the sizes), and the depth imbalance, (bid depth − ask depth) ÷ (bid depth + ask depth) over a stated number of levels. The imbalance runs from −1 to +1 and is a statement about displayed size, no more.
The microprice. A size-weighted mid: (best bid × ask size + best ask × bid size) ÷ (bid size + ask size). It moves towards the side with less size, on the argument that the thinner side is the one with less depth behind it. It is often a closer estimate of the next trade’s price than the mid in a book with an uneven top, and it is still an estimate built from two numbers.
The tape. Executed prints. From it come the volume (the sum of the sizes), the VWAP (the size-weighted average price), and the delta: volume executed at the ask minus volume executed at the bid, accumulated over a window. The delta requires a rule, because a print records a price and a size and not a side.
The aggressor rule. The convention that assigns each print a side. The quote rule compares the print’s price with the prevailing bid and ask: at the ask is a buy, at the bid is a sell. The tick rule assigns a print at or between the quotes to the side of the previous price change. Both are rules, neither is an observation, and where the two disagree the classification is a choice.
Table 1. The four records, the formulas that turn each into numbers, and what each formula cannot deliver. Source: constructed for this piece.
| Record | Formula | What it measures | What it cannot deliver |
|---|---|---|---|
| Book | spread = best ask − best bid; mid = (bid + ask) ÷ 2 | The cost of crossing and the reference price | Whether the displayed size will still be there |
| Depth | depth = Σ size at n levels; imbalance = (bid − ask) ÷ (bid + ask) | Displayed size and its asymmetry | Whether size is one order or twenty, or real or fleeting |
| Microprice | (bid × ask size + ask × bid size) ÷ (bid size + ask size) | The balance of the top of the book | Anything about levels below the top, or about direction |
| Tape | volume = Σ size; VWAP = Σ price × size ÷ Σ size; delta = at-ask − at-bid | What traded, where, and on which side by rule | Who traded, why, or whether it was one participant |
The formulas are the easy part. What follows from them is a set of numbers that are true of one snapshot and one window, and the discipline of a read is to keep them in that frame.
One book, worked
Table 2 is five levels a side on an illustrative instrument, with the derived figures computed from the snapshot. The bid side is deeper than the ask side by 500 units across the five levels, which is an imbalance of 1.54 per cent, and the top of the book is thinner on the offer, which is why the microprice sits above the mid.
Table 2. An illustrative five-level book, with cumulative depth, and the figures derived from it: spread, mid, microprice and depth imbalance. Source: constructed for this piece; not a market quotation.
| Level | Bid size | Cumulative bid | Price | Ask size | Cumulative ask |
|---|---|---|---|---|---|
| 1 | 1,200 | 1,200 | 49.99 | 900 | 900 |
| 2 | 2,400 | 3,600 | 50.00 | 1,800 | 2,700 |
| 3 | 3,100 | 6,700 | 50.01 | 2,900 | 5,600 |
| 4 | 4,600 | 11,300 | 50.02 | 4,100 | 9,700 |
| 5 | 5,200 | 16,500 | 50.03 | 6,300 | 16,000 |
| Derived | Bid 16,500 | Ask 16,000 |
The four derived figures, in the order a reader should compute them:
- Spread: 49.99 − 49.98 = 0.01, which is 2.00 basis points of the mid. The basis-point figure is 0.01 ÷ 49.985 × 10,000 = 2.0006.
- Mid: (49.98 + 49.99) ÷ 2 = 49.985.
- Microprice: (49.98 × 900 + 49.99 × 1,200) ÷ 2,100 = 104,970 ÷ 2,100 = 49.985714. That is 0.000714 above the mid — 0.14 basis points — because the bid side of the top is 300 units heavier than the offer.
- Depth imbalance: (16,500 − 16,000) ÷ (16,500 + 16,000) = 500 ÷ 32,500 = 1.54 per cent.
Two of those numbers are worth pausing on, because they bound what a read can claim. The microprice’s advantage over the mid is 0.14 basis points, which is a fourteenth of the two-basis-point spread and about a fifteenth of the 2.20 basis points it costs to lift 4,000 units off this book. The depth imbalance is 1.54 per cent, and it moved by 14.02 percentage points between two snapshots fifteen minutes apart without the spread or the mid changing at all. Both figures are real, both are computable, and both are small enough that a read which leans on them is leaning on the third decimal of a number whose first decimal is uncertain.
Walking the book: what a trade costs
The figure an order-flow read exists to produce is not the imbalance. It is the cost of the trade the reader intends to place, and that is arithmetic on the levels rather than a statistic.
Take a buy of 4,000 units against the book in Table 2. The order walks the offer: 900 at 49.99, 1,800 at 50.00, and 1,300 at 50.01, which is 4,000 filled and $200,004.00 paid. The filled VWAP is 50.001, which is 2.20 basis points above the best ask of 49.99, and the difference in cash is $44.00. The sell of the same size walks the bid: 1,200 at 49.98, 2,400 at 49.97 and 400 at 49.96, for $199,888.00, a VWAP of 49.972, 1.60 basis points below the best bid, and $32.00 of slippage.
Buying and then selling the same size immediately costs the difference: 4,000 × (50.001 − 49.972) = $116.00, which is 5.80 basis points of the mid. That number is the one to keep. It is the cost of a round trip against this book at this size, before commission, and it is measurable from the snapshot alone — no view about direction, no estimate of intent, no inference. It is also 25 per cent of the displayed depth on the offer side, which is the second useful fact: the order is large relative to what is shown, so the walk goes three levels deep on the way in and three on the way out.
The cost scales with size in a way the spread does not. A 900-unit buy pays one level and 2.00 basis points over the best ask; a 4,000-unit buy pays 2.20; a 10,000-unit buy would exhaust the five displayed levels entirely and its cost would depend on depth the snapshot does not show. This is why the spread is a poor summary of execution cost and why a read that reports only the spread has reported the cheapest trade in the book as though it were the price of all of them.
A second snapshot, fifteen minutes later, shows why a single book is a snapshot and not a state. The same prices are quoted with different sizes: the best bid thins from 1,200 to 300, the second level thickens from 2,400 to 5,100, the offer’s top thickens from 900 to 2,600, and the five-level imbalance moves from +1.54 to +15.56 per cent — a change of 14.02 percentage points with the spread unchanged and the mid unchanged. The read cannot say whether the bid at 49.98 was cancelled, filled, or replaced by an iceberg that refreshed at a lower price. That is not a gap in the analysis; it is a property of what a snapshot records.
The tape, and the inference in the middle
The tape adds the second dimension: what actually traded. Table 3 is seven prints in an interval during which the offer rose from 50.01 to 50.03 and the bid followed a tick behind. Volume is 4,000 units, VWAP is 50.0105, and the delta depends on how the sides are assigned.
Table 3. Seven illustrative prints, the prevailing quote at each, the assigned side under the quote rule, and the running delta. Source: constructed for this piece; the assignment is a rule applied to the prints, not an observation of the participants.
| Price | Size | Prevailing bid / ask | Side | Running delta | |
|---|---|---|---|---|---|
| 1 | 50.00 | 600 | 49.99 / 50.01 | Buy | +600 |
| 2 | 50.01 | 700 | 50.01 / 50.02 | Sell | −100 |
| 3 | 50.01 | 500 | 50.00 / 50.01 | Buy | +400 |
| 4 | 50.02 | 800 | 50.02 / 50.03 | Sell | −400 |
| 5 | 50.02 | 400 | 50.01 / 50.02 | Buy | +0 |
| 6 | 50.01 | 600 | 50.01 / 50.02 | Sell | −600 |
| 7 | 50.00 | 400 | 49.99 / 50.01 | Buy | −200 |
Read the price and the side together and the dependence is visible. The price 50.01 is a sell at rows 2 and 6, where it trades on the bid, and a buy at row 3, where it lifts a 50.00 bid one tick to reach a 50.01 offer. The price 50.02 is a sell at row 4, on the bid, and a buy at row 5, on the offer. Identical prices, opposite sides, and the difference is not in the print — it is in the quote that happened to be standing at that moment, which the analyst has to supply and the file may supply late.
Two of the seven prints fall exactly at the prevailing midpoint — row 1’s 600 at 50.00 against a 49.99 / 50.01 market, and row 7’s 400 at the same price — where the quote rule has nothing to say and the tick rule decides. Reassign those two and 1,000 units move from the at-ask total to the at-bid total: at-ask falls from 1,900 to 900, at-bid rises from 2,100 to 3,100, and the delta changes from −200 to −2,200. Nothing about the trades changed. The rule did.
That is the honest measure of what a delta is worth: it is the sum of a classification, and the classification has an error rate nobody in this file can measure. A read that reports delta without the rule, the window and the venue has reported a number that a second analyst could reverse without disagreeing about any print.
What the data cannot show
The list of things an order-flow read cannot establish is longer than the list of things it can, and the discipline is to keep them apart in the note rather than in a footnote.
Intent. A large aggressive buy is consistent with a directional view, a hedge of a short position, a delta-hedge on an option book, an index rebalancing, a stop-loss, an unwind of a pairs trade, or a market maker flattening after a fill. The tape records the trade and not the reason, and the same print appears under every one of those explanations.
Identity. The file has prices and sizes. It does not have participants. A market maker’s passive fill and a hedger’s passive fill are indistinguishable, and the question that matters — is this one informed trader or forty uninformed ones — is not answerable from the tape.
Permanence. A displayed order is not a commitment. It can be amended or withdrawn at any moment, and a book that shows 5,200 units at 49.94 shows an intention that may not survive the next tick. Depth is a measurement of what is offered now, and reading it as a queue of committed buyers is the commonest error in the genre.
Attribution of size. One parent order produces many prints. A 4,000-unit buy worked by an algorithm appears on the tape as seven prints, or forty, at several prices. Counting prints as participants multiplies the number of actors by a factor that is unknown and usually large; the volume is a fact, the participant count is not.
Off-book activity. Dark pools, internalisation and periodic auctions execute without appearing in the displayed book, sometimes without appearing on the tape before the trade is reported. A book that looks balanced may be balanced because the imbalance is being worked elsewhere.
Causation. The book moving after a print is not the print’s effect. A level that disappears when a large trade arrives can be a fill, a cancellation prompted by the print, or an unrelated withdrawal two milliseconds later. Sequencing in time is not causation, which is the same discipline that separates a contribution from a cause in an inflation decomposition.
The list divides in two. Spread, mid, microprice, depth, the cost of a walk and the volume on the tape are arithmetic on a record: they can be recomputed from the same files, and they are true of the window they describe. Intent, identity, permanence, the participant behind a print, the business done off the book and the reason a level disappeared are not in the record at all — and a read that supplies them without labelling them as inference has moved from measurement to narrative without saying so.
The sample is smaller than it looks
There is a statistical point that belongs beside the inference point, and it is about the denominator.
A book of five levels a side is ten observations, and they are not independent: the sizes were placed by a small number of participants who can see each other’s quotes. An imbalance computed across those ten numbers has no distribution to appeal to, and a single number computed from a single snapshot cannot be compared with anything. A read that says “the book is bid-heavy” is describing one photograph.
The tape is larger and still small. A twenty-minute window in a quiet instrument may contain a few hundred prints, of which most are one algorithm’s child orders. An effective sample of independent decisions in a window may be a handful. This is why the arithmetic of an order-flow read is presented per snapshot and per window rather than as a rate: the rate would need a denominator — how many windows, how many participants — that the data does not carry.
What a read costs
Three engine calls produce the numbers: orderbook, for spread, mid, microprice, depth and imbalance from the snapshot; volume, for the tape’s VWAP, the accumulation measures and the delta; and verify, to cross-check the snapshot against a second observation — a book read off a delayed feed is a picture of a different moment, and the walk in this piece is only valid for the book it was computed on. At the published $0.006125 on Base that is $0.018375, published rather than measured while the analyst services are pending review.
Three model calls draft the note at DeepSeek’s measured $0.00700: one to write the read, one to state the rule used for the aggressor side, one to write the paragraph that says what the window cannot show. That is $0.021000, so one read is $0.039375.
Ten a month, on a handful of instruments, is 30 engine calls ($0.183750) and 30 model calls ($0.210000): $0.393750, or $0.039375 a read and $4.73 over twelve months. At the metered ceiling of $0.00955 the model line rises to $0.286500 and the month to $0.470250, 19.4 per cent more; on Qwen at a flat $0.00875 the model line is $0.262500 and the month $0.446250, 13.3 per cent more. A read is six paid calls, so the 0.50 USDC opening balance — seventy-one calls at $0.00700 — holds eleven reads. The document parts that render the table carry no published per-call price and sit outside every total here.
A decision rule
An order-flow note is worth the calls when it reports the arithmetic and stops before the story. Six fields, and the last of them is the rule.
Publish the instrument, venue, timestamp and venue’s own latency. A snapshot without an as-of time is a quotation without a date.
Publish the derived figures with their formula. Spread in ticks and in basis points, mid, microprice and its distance from the mid, and depth imbalance at a stated number of levels. The last of those is meaningless without the level count: five levels and twenty levels answer different questions.
Publish the cost of the intended order, walked. The size, the levels consumed, the filled VWAP, the slippage against the best quote in cash and in basis points, and the round-trip cost if the position is likely to be reversed. This is the number that changes a decision.
Publish the tape’s volume, VWAP and the aggressor rule. Which convention, applied over which window, on which venue. Where prints fall at the midpoint, say how they were assigned and what the alternative assignment does to the delta.
Publish the sample. The number of prints, the window, and the number of distinct price levels touched — because the count of prints is not the count of participants.
Publish the sentence that closes it. The book records orders and the tape records trades; neither records intent, identity or permanence, and nothing in the read will tell you who was buying or whether they will continue.
The decision that follows is not whether the price will rise. It is whether the trade is affordable: what it costs to get in, what it costs to get out, how much of the displayed depth it consumes, and what the tape shows about how much business is being done at these prices. All four are measurable, and a note that reports them has done the work — even if the reader, quite properly, draws no conclusion about direction from any of it.
Method note
The instrument, the two book snapshots, the seven prints and every figure in Tables 2 and 3 are constructed for this piece and describe no market, no venue and no participant; they exist so that the formulas can be checked by hand. The spread is 49.99 − 49.98 = 0.01, which is 2.0006 basis points of the mid of 49.985; the microprice is (49.98 × 900 + 49.99 × 1,200) ÷ 2,100 = 49.985714, 0.14 basis points above the mid; the five-level imbalance is (16,500 − 16,000) ÷ 32,500 = 1.538 per cent. The 4,000-unit walk fills 900 at 49.99, 1,800 at 50.00 and 1,300 at 50.01 for $200,004.00 and a VWAP of 50.001, which is $44.00 and 2.20 basis points above the best ask; the sell fills 1,200 at 49.98, 2,400 at 49.97 and 400 at 49.96 for $199,888.00 and a VWAP of 49.972, which is $32.00 and 1.60 basis points below the best bid; the round trip is 4,000 × 0.029 = $116.00, or 5.80 basis points of the mid. The second snapshot’s imbalance is (20,800 − 15,200) ÷ 36,000 = 15.556 per cent, 14.02 percentage points above the first. The tape’s volume is 4,000 across seven prints, its VWAP is 50.0105, the at-ask volume is 1,900 and the at-bid 2,100, so the delta under the quote rule in Table 3 is −200; prints inside the spread are assigned by the tick rule, and reassigning the two midpoint prints moves 1,000 units and takes the delta to −2,200. Engine prices are the published $0.006125 per basic operation on Base from catalog.json, read 31 October 2026, published rather than measured because the analyst services are pending review and return no 402 quote. Model prices are measured from the live 402 handshake’s exact amount on Base on 31 October 2026 at a short prompt and max_tokens: 1000: $0.00700 for deepseek-v4-flash, $0.00955 at about 3,000 tokens, and $0.00875 for qwen3.8-flash at both lengths. Monthly counts are planning assumptions. Nothing here is a forecast of price, a claim about any participant’s intention, a claim that order-flow measures predict direction, or investment advice.
The pillar is Finance and markets on x402 — three engines, four jobs, one price. The role that produces a read is trade_analyst, which takes a level-2 snapshot and returns spread, mid, depth imbalance and a weighted mid, and states each figure with its as-of time and what it does not tell you. The compute is bought at x402.press/services/deepseek/ with a second model at x402.press/services/qwen/; the measured handshake is reviewed at DeepSeek: per-call chat completions over x402, and the two endpoints against each other at Inference endpoints compared. The separation of measured contribution from claimed cause is the argument of Inflation decomposition, where the same discipline is applied to a print rather than a tape. And liquidity as a price rather than a mood is the question in How to value a private company, where the discount for not being able to trade at all is a convention the valuer must disclose rather than a measurement the market supplies.
x402.review is written and edited by N.P. Vincent. The publication is connected to x402.press, which sells the services reviewed here; that interest is disclosed on every piece that touches a service, and it is stated here rather than left to inference.
Filed under Jobs · Tags: order-flow, market-microstructure, trading