Latency and queue position

You posted at the best bid, the market traded at that price for a while, and you received nothing. Someone who posted after you did get filled.

Neither observation is evidence of anything unfair. Both are the arithmetic of a queue whose contents you cannot see, ordered by a quantity you cannot measure. Queue position is not luck and it is not awarded — it is assigned by the order of arrival at the matching engine, and latency is the thing that determines that order.

What latency is, concretely

Latency is the elapsed time between an instruction existing and that instruction being applied to the book. It is not one number but the sum of several, and the components have very different sizes.

Decision-to-send. Whatever happens between you knowing what you want and the instruction leaving: in a manual interface, this dominates everything else by orders of magnitude.

Transit. Time on the wire to the venue’s gateway. Governed by distance and by the path, and different participants have very different values here for reasons unrelated to anything they did at the moment of sending.

Gateway and risk checks. The venue validates the instruction against your account before the engine sees it. This is real work and it takes real time, and it can queue if the gateway is busy.

Sequencing. The step that converts many arriving instructions into one ordered list. This is where “who was first” is actually decided, as covered in how the engine works.

Publication. The return leg — the engine’s result travelling back to you, and the market data update travelling to everyone. This does not affect your queue position, but it is why your picture of the book is always of a state the engine has already left.

The sum matters less than the fact that the sum is different for every participant, and stable enough that the differences are not noise.

Queue position is a property of an order, not of you

At each price level under price-time priority there is an ordered list, and queue position is where your specific order sits in it. It was determined entirely by when that order arrived relative to the others already there.

Three consequences follow, and they are the whole subject.

It is attached to the order, not the account. Cancel and resend and you have a new order with a new position at the back. Nothing carries over.

Most modifications destroy it. Changing price moves you to a different queue; increasing size generally counts as a new order. This is the substance of what amending does, and it is the most common way position is lost by someone who did not know they had any.

It is invisible. Venues publish quantity at a price. Almost none publish where in that quantity your order sits. Estimating it means tracking what was resting when you arrived and what has traded since, which is inference, not observation.

The two races, which are different

Latency is spoken about as one thing and it decides two separate contests.

The race to take. Two participants want the same resting order. The one whose instruction reaches the engine first gets it; the other finds the level gone and either rests or walks further. This race is decided in the moment, by arrival, and it is the one people mean when they say latency matters.

The race to post. Two participants want a place at a price level that neither has traded at yet. Here the reward is not a fill but a position in the queue — a claim on future incoming orders. The contest is settled in advance and paid off later, or never.

The second race is why a level can be many orders deep within an instant of a new price becoming available, and why arriving late at a price that has just become interesting means resting behind everything that was already there.

The mechanism

THE MECHANISM — arrival, position, and fills

  · Order arrives at the engine
                    → placed at the back of the queue
                      for its price level. Arrival
                      order is the only input.

  · Two orders sent in the same instant
                    → separated by transit, gateway
                      load and sequencing. One is
                      strictly first.

  · Resting at the best price
                    → NO GUARANTEE of a fill. Volume at
                      your price is not volume reaching
                      your position.

  · Cancel and resend, or amend the price
                    → position forfeited. The new order
                      joins the back of the new level.

  · Reducing size
                    → generally keeps position; the
                      original timestamp is retained.

  · Your view of the queue
                    → NOT PUBLISHED. Depth shows
                      quantity at a price, not your
                      place within it.

  · Whether allocation is by time at all,
    and any batching window
                    → VENUE-SPECIFIC. Pro-rata and
                      batched designs make arrival
                      order matter less or not at all.

Worked example

Illustrative figures, synthetic throughout. Suppose a bid level at 40,000 holds four orders in arrival order: 3.0, 2.0, 1.0, and then yours for 1.0. Seven units sit ahead of you.

An incoming sell of 4.0 units crosses at that price. It fills the 3.0 completely and 1.0 of the 2.0. The tape now shows 4.0 units traded at exactly your price and you have nothing, correctly.

A second sell of 5.0 arrives. It takes the remaining 1.0, the 1.0 behind it, and 1.0 of yours — you are filled in full, on the second event, after 9.0 units had traded at your price.

Now change one thing. Suppose midway through, between the two sells, you amended your order from 1.0 to 1.5 units at the same price. On a venue that treats an increase as a new order, you are now behind the two units that were ahead of you and behind nothing else — but your timestamp is new, so the remaining resting orders at that level are all ahead of you. The second sell of 5.0 exhausts them and reaches you with 2.0 to spare, so you still fill. Change the second sell to 3.0 and you do not.

The point is not the specific outcome. It is that every difference came from ordering, and none of it was displayed anywhere.

What being early is worth, and what it is not

Being at the front of a queue means being filled sooner and more often at that price. That is the entire mechanical content of the advantage.

It is worth stating what it is not. A fill is not a good outcome in itself — it is a position, and what happens to that position afterwards is not something this site comments on. There are circumstances in which the front of the queue is exactly where an order you would rather not have had gets filled first, and the order at the back was spared. Priority is a claim on execution, and execution is neutral.

Nor is any of this a technique. Latency has physical and architectural causes; the mechanical fact is only that it exists, that it is unequal, and that it is the input to an ordering you are subject to rather than one you observe.

The failure mode

The characteristic error is reading the tape as evidence about your own order. Volume printing at your price feels like proof that your order should have traded, and it is not: it is proof that quantity reached someone at that price.

The second failure mode is slower and worse. An order repeatedly adjusted in a moving market can spend its whole life at the back of successive queues and never reach the front of any, while presenting in the interface as an actively managed order sitting at a competitive price. If it is not filling, the history of your own instructions is the first place to look, before the book and well before the venue.