Design a retail trading platform
FanaticsSoftware Engineer · OnsiteLast updated
This question evaluates a candidate's competencies in designing scalable, low-latency retail trading systems, covering system architecture, order routing and state management, market data ingestion, cash and position ledger consistency, risk controls, and compliance/observability.
Design an online retail stock trading platform similar to Robinhood. Cover: user onboarding with KYC/AML and funding (e.g., ACH); real‑time balances; market data ingestion and streaming quotes; order submission/validation, risk checks, idempotency, and support for market/limit/stop orders; routing to market makers or exchanges and post‑trade processing with a clearing broker; portfolio and positions with cost basis, PnL, and corporate actions; data model and storage for orders, trades, accounts, and ticks; service decomposition and APIs (sync vs. async), message queues, and event sourcing; consistency and latency guarantees for order state vs. portfolio views; scale and reliability at market open surges, backpressure, HA/DR, and failure modes; observability, auditing/compliance logging, and incident fallbacks (e.g., market data outage); and how you would extend the design to support options or crypto later.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.