Why was my limit order not filled?

Matchstick guide
#guide#limit-orders#queue-position#level-2

Why a limit order can sit unfilled when price seems to touch it, what a recorded order book can show you about that moment, and what it cannot.

What you get: a plain explanation of why a limit order can stay unfilled when the price looks like it reached you, and a way to look at the order book around that moment.

The short answer

A limit order fills only when someone trades against it. At many exchanges, orders at the same price are filled in the order they arrived, so an order placed later waits behind the orders already there. Price can touch your level, trade some of the size ahead of you, and move away before your turn comes.

That is a queue. A common reason for an unfilled order is that it was in that queue and not yet at the front. It is not the only one: an order that was rejected, cancelled or held, or placed after price had already moved away, was never waiting in it.

What a recorded order book shows

A Level 2 recording keeps the total size at each price and how it changed over time. In a replay you can:

  1. Go to the moment price reached your level.
  2. Read the size sitting at that price just before and just after.
  3. Step forward one event at a time to see whether the displayed size at that price shrank, grew or disappeared.

If a lot of size was displayed at your price when you placed the order, there was probably a lot ahead of you. A drop in displayed size does not say why it dropped: trades and cancelled or modified orders all reduce it, and a Level 2 recording does not tell them apart or record trades. So a drop alone does not tell you how close to the front you were. A replay lets you look at the picture instead of guessing.

What it cannot show you

  • Where your own order sat in line. A Level 2 book gives the total at a price, not who is ahead of you. Data that lists each order separately (“market by order”) can show that; see market by order vs market by price.
  • Your order itself. Replay reads a recording of the market. It does not read your broker’s order or fill history, so it does not tell you what your order did.
  • Advice. Replay shows what the book did. It does not tell you what to trade.

Try it with a made-up example

Open the free demo and pick a sample session. It is synthetic, so there is no real market data in it. Scrub to a moment where size at a price changes (the timeline markers help you find one) and step through it. The numbers you will see are made up. The point is the habit: look at the size at your price before and after the moment you care about.

What you do next

Open the free demo and find a moment where the size at one price changes. If you have your own depth recording, the guide for Tardis.dev files shows how to load it. To hear when there is something new, join the notification list.

To talk to Matthew about how you replay trades, email hello@matchstick.trading.