Todos los artículos

How one buy order finds its sellers

Price-time priority, the price you actually pay, and where your reserved cash goes, worked through with one order.

Esta página aún no está traducida, así que se muestra en inglés.

An orbital sunrise seen from the International Space Station: a thin blue line of atmosphere above an orange horizon.
Foto: NASA

Every exchange needs an answer to one question: when several orders could trade, which one goes first? Ours is the classic answer, price-time priority. It is easier to see than to define, so here is one order, followed from start to finish.

The book before the order

Two sellers are already waiting in the ORBT book. Bora wants to sell 4 shares at 101. Cem wants to sell 3 at 102. Nobody is buying yet.

Seller Price Shares
Bora 101 4
Cem 102 3

Ayla has 2,000 in cash and no ORBT. She sends a limit order: buy 10 at 102. A limit order means “no more than this price”. She will not pay 103, but she is happy to pay less.

Step one: set the money aside

Before anything trades, the exchange reserves the worst case: 10 shares at 102, so 1,020. Ayla still has 2,000 in cash, but only 980 is free to use. This is what stops her from spending the same money on two orders at once.

Step two: the best price goes first

The cheapest seller is Bora at 101, so he goes first. Ayla’s 102 is at least his 101, so they trade: 4 shares at 101.

Notice the price. The trade happens at 101, Bora’s price, the order that was already waiting. Ayla was willing to pay 102, but she does not have to. She had 4 × 102 = 408 set aside for these shares and pays 404, so the 4 she saved is released straight back to her free cash.

Step three: the next price

Ayla still wants 6 shares. The next seller is Cem at 102. That still meets her limit, so they trade 3 shares at 102, for 306.

Had two sellers both asked 102, the one who placed their order first would have been filled first. That is the “time” in price-time priority. Arriving earlier is the only way to get ahead at the same price. Placing a bigger order does not.

Step four: the rest waits

Nobody else is selling at 102 or less, so the remaining 3 shares of Ayla’s order rest in the book as a bid at 102. Their 306 stays reserved until they trade or she cancels.

Before After
Cash 2,000 1,290
Reserved 0 306
Free to use 2,000 984
ORBT 0 7

Every number checks out. She paid 404 + 306 = 710, so her cash fell from 2,000 to 1,290. Bora and Cem received exactly those 710 between them, and gave up exactly the 7 shares she gained. Nothing appeared and nothing vanished, which is the property our tests check after every single step.

One more rule: never against yourself

If the waiting seller had been Ayla herself, from an older order, the exchange would not let her trade with herself. The rest of her new order would be cancelled, and her old order would stay where it was.

Pantalla

Tema
Tamaño del texto
Interlineado
Lectura
Visión
Movimiento y navegación
Estructura de la página

Títulos

    Regiones

      Guardado solo en este navegador.