Content Case Study
Trading Order & Market Data Systems
Real-money order execution and exchange market-data services built to stay correct through timeouts, duplicate submissions and upstream disconnects.
Problem
Live trading paths cannot tolerate ambiguity: a timed-out order request might have executed, market-data sockets drop, and per-request upstream lookups add latency to the hot path.
Solution
- Built retry-safe order workflows using idempotency keys and request-state tracking, reconciling REST acknowledgements against execution events.
- Integrated broker APIs and 3 WebSocket channels with heartbeat monitoring, subscription recovery and post-reconnect state reconciliation.
- Designed an instrument lookup service across 6 exchange segments with in-memory symbol, expiry and token indexes on a scheduled refresh.
- Implemented incremental NDJSON processing with partial-record buffering, bounded batches, cancellation and stream-error handling.
Technical Highlights
- Duplicate submissions, delayed updates and ambiguous timeouts resolved without double-placing orders.
- Per-request upstream calls removed from the hot path.
- Authenticated encryption with versioned keys, supporting rotation without breaking in-flight requests.
Outcome
Order and market-data flows that stay accurate across failures, with positions kept consistent through upstream disconnects.
Node.jsTypeScriptWebSocketsNDJSON streamingEncryption