How a Trading System Is Structured End to End

A production trading system moves through six stages from raw market data to a live order, and the handoffs between them are where failures start.

A production trading system moves an idea from raw exchange data to a live order in six distinct stages, and the handoffs between those stages are where almost every serious production failure originates. Multicast market data arrives at a feed handler, is normalized into an internal representation of the order book, is read by a strategy that computes a decision, passes through a pre-trade risk layer, is encoded by an order gateway into the venue's wire protocol and sent, and the acknowledgement and any resulting fill return over a session that is often separate from the one the order left on.

Exchanges publish market data as multicast UDP, typically on two parallel lines commonly labeled A and B, so a switch failure or a dropped packet on one line does not take the feed down entirely. Each message on each line carries a sequence number, and a feed handler tracks both lines independently, arbitrating between them by taking whichever line delivers the next expected sequence number first and falling back to the other line when a gap appears on the first.

The handler's output is a normalized internal book, a data structure that looks identical to downstream code regardless of whether the underlying venue is a US equity exchange or a European derivatives market running a different binary protocol. That normalization step is what lets one strategy codebase run against several venues without being rewritten for each one, a point covered in more detail in the guide to market microstructure and order books.

A feed handler that falls behind the wire is a harder problem to catch than one that stops outright, because a book built from stale data produces decisions based on a market that no longer exists. Firms measure feed handler health primarily in queue depth and processing latency rather than in uptime alone, and a handler lagging by even a few milliseconds during a fast market is treated as a live incident.

Once the book updates, a strategy process reads it and decides whether to send a new order, cancel a resting one, or do nothing. The path from a book update to a decision runs in single-digit to low double-digit microseconds at firms competing directly on speed, and in a few hundred microseconds to milliseconds where the edge sits in the model rather than in raw latency, a distinction the guide on high frequency trading and market microstructure covers directly.