low-latency execution engine

Order routing and execution infrastructure for a proprietary trading desk. Handles smart order routing across venues with sub-millisecond internal latency.

what it does

Takes a parent order, breaks it into child orders based on venue liquidity and fee structure, routes them in parallel, and reconciles fills back to the parent. Manages partial fills, rejects, and venue-specific quirks without losing state.

stack

Go for the core routing logic — goroutines map cleanly to concurrent venue connections, and the runtime overhead is predictable. FIX protocol for venue connectivity. PostgreSQL for order state persistence with a WAL-based audit trail.

hard parts

Venue latency variance. One venue might ACK in 2ms, another in 40ms. The routing logic needs to be non-blocking so a slow venue doesn't delay execution on a fast one.

Order state machine correctness. A fill can arrive after a cancel request is already in-flight. The state machine has to be explicit about every transition and reject illegal ones rather than silently ignoring them.