Mechanism library · English
How an order actually reaches the exchange
The path from the moment you send an order to the moment it is filled: validation, tagging, routing, matching, and the confirmation that comes back.
Validation happens before routing
An order is not sent anywhere the moment you press the button. It is first checked locally: does it carry the right identifier, is it inside the price band, is the quantity a valid multiple, is there enough margin. Each check has one job — to refuse the order before it can cost anyone anything. Most rejections happen here, in milliseconds, and never leave the building.
The path is a sequence of gates. Skipping one is a bug, not a shortcut.
| Step | What it checks |
|---|---|
| Client / UI | That a human or a registered algo intended this |
| OMS | Idempotency and order state |
| Risk | Size, velocity, restrictions |
| Broker adapter | The broker’s own RMS and session |
| Exchange | Bands, tick, freeze |
Tagging: the order carries its story
If the order is algorithmic, it carries its Algo-ID; if it is manual, it is tagged as manual. The tag is attached once and travels with the order through every stage, so an audit at any point can say which algorithm or which human produced it. An algorithmic order without a registered ID is stopped at this stage — never sent onwards with a blank.
Routing, matching, and the confirmation
A checked and tagged order goes to the broker's gateway, which routes it to the exchange over a connection whose origin is fixed and known. At the exchange, the order enters the matching engine: a limit order waits in the order book until a counterparty meets its price; a market order takes what is available at the moment of arrival. The fill comes back the same path — exchange to broker to you — with the time, the price, and the quantity of what actually happened, not what was asked for.
Why the path is fixed
Every stage of the path is a point where something can be recorded. A system where orders move from stage to stage without leaving a trace is one where a problem can be noticed only at the end — after the trade. The fixed path exists so that every order can be reconstructed afterwards: where it came from, what checked it, what it carried, and what it met.