XDRIPACADEMY
Sign in

Curriculum·F107 Exchanges, On-Ramps, and Off-Ramps·48 min

Order types as an execution skill

By the end of this lesson you can

  • Explain what a market order actually instructs, and why the price you see is not a price you are promised
  • Read depth rather than the last-traded price, and estimate the fill of a given size
  • Choose between market, limit and stop for a stated purpose, and name what each one can fail to do
  • Compute slippage on a thin book and set a slippage tolerance that is a decision rather than a default
AutopsyThe Binance.US flash crash, 21 October 2021no single named victim, and everyone holding a stop in the range was filled

11:34 UTC, 21 October 2021. The price of bitcoin on Binance.US falls from around $65,760 to as low as $8,200. About 87 percent, in seconds.

Roughly 13 seconds later it is back where it started. Other venues moved about $1,000 in sympathy.

The exchange attributed it to a bug in an institutional customer's trading algorithm: an order that consumed the available bids far below the prevailing price.

Nothing was hacked. No price was manipulated in the usual sense. A single large order met a book that did not have enough resting bids to absorb it, and the exchange did exactly what an exchange does, which is match against whatever exists.

And anybody holding a stop order in that range had it triggered and filled during those 13 seconds, at prices that stopped existing before they finished reading about it.

The number displayed as "the price" is a record of the last trade. It describes something that already happened. It makes no promise whatsoever about the next one, and this lesson is about the gap.

Primary source

Order types look like a trading topic and they are not. They are an execution skill, and the execution skill is what determines whether the trade you intended is the trade you got.

We are teaching mechanics here and nothing about when to buy or sell. That is a different subject with its own honesty requirements, and it lives in the Sophomore level.

There is no price, there is a book

The single number you see on a screen is the last trade. Underneath it is an order book: a list of resting offers to buy at various prices and resting offers to sell at various prices.

  • The highest resting buy is the bid.
  • The lowest resting sell is the ask.
  • The gap between them is the spread, and it is a cost you pay whether or not anybody calls it a fee.
  • The quantity available at each level is depth, and it is the thing that actually determines your fill.

When you buy, you are not buying from the exchange. You are matching against somebody else's resting order. If your size exceeds what is resting at the best price, you take that level and move to the next one, and the next.

That is the whole mechanism, and the flash crash is what it looks like at the extreme.

Three instructions

A market order says: fill me now, at whatever prices exist, for as much as it takes. It contains no instruction about price. It is an instruction about urgency, and its failure mode is that it always succeeds, at a level you did not choose.

A limit order says: fill me at this price or better, and otherwise wait. It contains no instruction about urgency. Its failure mode is that it does not fill, which is a real cost when the move you were trying to catch happens without you.

A stop order says: when the price reaches this level, submit an order. Critically, a plain stop submits a market order. It inherits every property above, which is why the flash crash filled them at $8,200.

A stop-limit submits a limit order instead, which protects your price and can leave you unfilled in exactly the situation you set it for. There is no version of this that is safe in both directions, and choosing which failure you prefer is the actual skill.

Worked example
What a market order costs on a thin book

A small-cap asset. The resting sell orders look like this:

PriceSize availableCumulative cost
$1.00500 units$500
$1.02800 units$1,316
$1.051,200 units$2,576
$1.153,000 units$6,026
$1.4010,000 units$20,026

The screen says $1.00.

Buying 500 units. You take the first level:

500 x $1.00 = $500, average price $1.00. No slippage.

Buying 2,500 units. You clear the first three levels and take 0 units from the fourth:

500 x 1.00 = 500 800 x 1.02 = 816 1,200 x 1.05 = 1,260

Total = $2,576 for 2,500 units

Average price = 2,576 / 2,500 = $1.0304

Slippage against the displayed price:

(1.0304 - 1.00) / 1.00 = 3.04 percent

Buying 6,000 units. Clear the first four levels (2,500 units for $2,576), then take 3,500 from the $1.15 level:

2,576 + (3,500 x 1.15) = 2,576 + 4,025 = $6,601

Average price = 6,601 / 6,000 = $1.1002

Slippage = 10.02 percent

Read the shape rather than the numbers. Slippage went 0 percent, then 3 percent, then 10 percent as size grew, and the displayed price never changed. It is not linear, and there is no warning on the screen at the point where it turns.

Now invert it, because this is the part that matters for your own position. If you can buy 6,000 units at an average of $1.10, then somebody selling 6,000 units into the same book is receiving materially less than the displayed price. A position you can enter is not necessarily a position you can exit at the price you see, and the book is thinner on the way out than it looks on the way in, because the people who bought are now on your side.

That is the honest version of what F101-05's SQUID lesson said about price and exit, applied to assets where the contract is fine and the liquidity is not.

Slippage tolerance is a decision

On a decentralised venue you will be asked for a slippage tolerance, and most people accept the default without knowing what it does.

It is the maximum adverse move you will accept between submitting and settling. Set it low and the transaction reverts when the market moves, costing you gas for nothing. Set it high and you have authorised a worse fill than you intended.

Set it too high on a thin market and you have written a blank cheque, because anybody watching the mempool can move the price against you, let your transaction execute at your tolerance, and move it back. Your tolerance is the size of the invitation.

The rule: set it as low as will reliably fill for the asset you are trading, which means a fraction of a percent on a deep pair and higher on a thin one, and if a trade requires a large tolerance to go through, the trade is telling you something about the liquidity.

Defaults are not recommendations

Every field discussed here ships with a default: order type, slippage tolerance, whether a stop is a stop or a stop-limit.

Those defaults were chosen so that the largest number of transactions complete, because a completed transaction is what the venue is measured on. They were not chosen for your position size, your asset's liquidity, or your tolerance for a bad fill.

The default is a reasonable starting point and it is not a recommendation, and the difference matters most on exactly the thin markets where the arithmetic above bites hardest.

Choosing

Entering or exiting a liquid major asset, small size. A market order is fine. The spread is narrow, the depth is real, and the slippage is negligible.

Any size that is material relative to the book. A limit order, or several. Splitting size across levels is the entire technique and it costs you nothing but patience.

Anything thin, new or unfamiliar. A limit order, always, and read the depth first. The worked example is what happens otherwise.

Protection against a move while you are asleep. A stop, understanding that it becomes a market order and that the flash crash is the scenario where it fires. Consider a stop-limit, and accept that you have chosen the failure where it does not fill.

Common misconception

I got a bad fill, so the exchange must have manipulated the price against me.

It happens, and it is a far less common explanation than the ordinary one, and reaching for it stops people learning the thing that would actually help.

The ordinary explanation is in the worked example. You submitted an instruction that said "fill me at any price" into a book that did not have enough depth at the price you were looking at, and it did exactly what you asked. No intent is required and none is usually present.

You can check this yourself rather than guessing, which is the useful part. Look at the depth on both sides for the pair you traded. Compare your fill against the cumulative cost of clearing the levels. If your average matches what the book implies, you were filled correctly and the problem was the instruction.

If it does not match, or if the venue is one that routes your order elsewhere rather than matching it on its own book, that is a different question and F107-05's autopsy is exactly that case, with a $65M penalty attached.

Key takeaway

The number on the screen is a record of the last trade and promises nothing about your fill, because underneath it is a book of resting orders with finite depth. A market order instructs urgency and says nothing about price, a limit order instructs price and can fail to fill, and a plain stop is a market order waiting for a trigger, which is why the Binance.US book filled them at $8,200 during a 13-second dislocation. Read depth before size: on a thin book, slippage went from nothing to 3 percent to 10 percent as the order grew while the displayed price never moved. And treat slippage tolerance as a decision rather than a default, because on a thin market it is the size of the invitation.

These come back later

What does a market order instruct?
Fill me now, at whatever prices exist, for as much as it takes. It is an instruction about urgency and it contains no instruction about price at all.
What is the displayed price?
A record of the last trade. It describes something that already happened and promises nothing about your fill, which depends on the resting orders on the other side.
What can a limit order fail to do?
Fill. That is its only failure mode and it is a real one, because a limit that never fills during a move you needed to act on has cost you the move.
What is a stop order in a flash crash?
A market order waiting for a trigger. In a 13-second dislocation it triggers and fills against whatever bids remain, which is how a protective order becomes the mechanism of the loss.

Sources and review

Confidence high·Volatility medium·Reviewed 2026-08-05·Owner unassigned

Contested

Binance.US attributed the event to a customer's algorithm bug and no independent confirmation was published. Report the attribution as the exchange's, not as an established fact.

This lesson teaches execution mechanics and deliberately makes no claim about when to buy or sell anything. Do not let a revision add entry or exit guidance here; that belongs to S207 and it belongs there with its own honesty module.

Track your progress

Create a free account to mark lessons complete and pick up where you left off.