InterviewLegend

Design a Market Data System

Alex Chen45 min readUpdated 32 real interview reports

Picture what lands on the wire before you commit to any structure. An exchange broadcasts, it does not answer questions. A continuous stream of small binary messages arrives over UDP multicast: an order rested at this price for this size, an order was cancelled, a trade printed, an auction imbalance shifted. Each record is a few dozen bytes, each carries a sequence number, and they arrive back to back at a rate that spikes hard when the market moves. The system stands at the wire, reads that stream, and turns it into something the rest of the firm can reason about. Four jobs. Take the raw feed in, decode it into one model, and rebuild the book. Then keep the running statistics on top of the book fresh, which is the one people forget.

Decoding means one model for the whole world, so be precise about what "one model" buys you. Every venue speaks its own dialect. Nasdaq sends ITCH, CME sends a Simple Binary Encoding feed, the consolidated options feed carries its own layout, and their symbols and price scales all differ. Nothing downstream should care which venue a quote came from. So the system decodes each proprietary format into a canonical record: a firm-wide instrument id, a side, a price held as a fixed integer, a size, a message type, and a timestamp. The lever here is the type of that record. If the canonical form is a variant that is either a valid, fully-typed message or an explicit error, a half-filled record cannot exist to trip up a strategy two layers away.

Rebuilding the book means the system keeps state, it does not just forward messages. From the stream of adds, cancels, and modifies it maintains a live order book per instrument: resting bids ranked high to low, asks low to high, the size sitting at each price. But most consumers do not read the raw book on every tick. They read functions of it: the top of book, a moving average of the mid, VWAP over a window, rolling volatility.

What's inside
  • 1 diagram
  • 5 sections
  • about 45 min

Premium lessonJane Street interview guide

These took digging.

What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.

100 companies. Checked every month.

Unlock all 100 companies

$49 a year · less than $1 a week · 30-day money-back guarantee

Had your Jane Street interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Jane Street interview guide

Know what Jane Street asks before you walk in.

10 coding · 5 system design · 16 behavioral questions

Get Premium$49 a year · 30-day money-back guarantee
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.