Design a Stock Trading Platform
HardSystem design · Finance
Design a retail stock brokerage (Robinhood-style) with ~20M accounts. Users stream quotes, place and cancel orders that you route to exchanges or market makers, and see positions and cash update in real time. Cover pre-trade buying-power checks, the order lifecycle and idempotency, market-data fanout, an auditable ledger, and handling the market-open spike. You are not building the exchange's matching engine.
Requirements
- Separate market data, order entry, execution, and portfolio views
- Maintain auditable immutable events
- Handle idempotency, risk checks, and regulatory constraints