115TRADING
Contact
All research

3 min read

The mechanics of a fill

A mechanical walk through everything that happens between wanting to trade and having traded — the order book, price-time priority, order types, why latency became an edge, and why slippage and impact are costs you cause rather than fees you pay.

Listen

Narrated in the writer’s own voice · 4:29

Contents5 sections

There is a gap between deciding to trade and having traded, and the whole discipline lives inside that gap. From the outside a fill looks instantaneous: you wanted a position, now you have one. Inside, a sequence of mechanical events resolved your intention against everyone else's, at a price you influenced by the act of trading. The point of this note is to open that gap and look at the machinery, because the machinery is where cost is actually incurred — and where an honest process either accounts for it or quietly loses to it.

The book

Begin with the object your order meets: the limit order book. Resting limit orders sit in the book at chosen prices, waiting — they add liquidity, offering others the option to trade against them. Marketable and market orders reach across and take that liquidity immediately.

FIG.1 / ORDER BOOKONE-CENT TICK
Fig. 1 A buy for 900 shares at market finds only 300 at the best ask, so it walks up the book: 3 levels, an average of 100.029, 0.9¢ a share worse than the quote that was showing and 1.4¢ above the mid.

The gap between the best bid and the best ask is the spread, and the spread is the price of immediacy — what you pay for insisting on trading now rather than waiting in the queue. Every fill is one side of the book meeting the other, and which side you are on determines whether you were paid to wait or paid to hurry.

Price-time priority

The rule that orders the book is price-time priority, and it explains more than it first appears to. Orders match by best price first; at a given price, they match by time of arrival — first in, first out.

FIG.2 / PRICE-TIME PRIORITYASK 100.02
Fig. 2 At one price, the order that arrived first trades first. A buy for 600 fills all of A and 400 of B. The rest of B keeps its place at the front; C, three milliseconds behind B, gets nothing yet. Price decides who is in line; time decides the order of the line.

That second clause is the consequential one: at the same price, being early is an asset, because queue position determines who fills before the level is exhausted. This is why makers and takers are structurally different roles, why maker-taker fee models exist to compensate the providers of liquidity, and why two orders at identical prices can have very different fates. Time breaks the tie, and ties are constant.

Order types

Order types are the vocabulary you use to express intent against that structure.

  • A limit order names a price you will not cross and joins the queue.
  • A market order accepts whatever price the book offers to complete size.
  • A stop order rests dormant until a trigger converts it into a market or limit order and sends it into the book.

Each type is a different trade-off between certainty of execution and certainty of price — you can control one tightly, never both at once. Choosing among them is not a formality; it decides where in the mechanism your intention enters and how it behaves once it is there.

Why latency became an edge

Because time breaks price ties, physical and technical speed became an edge — this is the honest reason latency and colocation matter. A matching engine processes messages in strict sequence, so the order that arrives a microsecond earlier is genuinely ahead of the one behind it; there is no rounding at the level that decides queue position. Sitting closer to the engine, on faster paths, converts that sequencing into an advantage that has nothing to do with being right about the asset.

Some of the edge in modern markets is a claim on ordering, not on insight, and a serious process should know which of the two it is relying on.

Slippage and impact

All of which leads to the cost that most models understate: slippage and market impact. A large order is not filled at the top of the book — it walks down the levels, consuming liquidity and moving the price against itself as it goes, so execution is a cost you cause, not merely a fee you pay. Implementation shortfall names the gap precisely: the difference between the price when you decided and the price you actually achieved.

And the market you are walking is not one venue but many at once, stitched into a consolidated view — the NBBO in US equities is the canonical example — so your order interacts with fragmented liquidity, not a single pool. The spread you actually cross and the slippage you actually cause are real numbers; a process that respects them is measuring the fill it got, not the fill it imagined.

Sources