Design a Stock Order / Trade Management System
Problem
Problem Statement
Design a stock order and trade management system for a brokerage like Robinhood. Users should be able to place buy and sell orders, cancel open orders, see real-time status updates, and trust that orders are durable, auditable, and never executed twice.
Reported Robinhood interview signals for this question include:
- External exchange or broker APIs are provided, and you need to design how users place stock orders through them.
- The interviewer may emphasize reliability, durability, and explicit order state-machine behavior.
- Follow-ups often focus on database schema, API design, place/cancel edge cases, partial fills, and real-time order updates.
- Some loops connect this with Robinhood's fractional-share inventory problem: a user may trade
0.5shares while the brokerage ultimately interacts with venues in whole-share quantities or through an internal inventory layer.
This is similar to the Coinbase crypto order-flow question because both are order-management systems with async venue callbacks, idempotency, timeouts, and reconciliation. The Robinhood version should lean harder into equity-brokerage constraints: market hours, buying-power and share reservations, cancel/fill races, fractional inventory, regulatory audit trails, and end-of-day reconciliation.
Self-assessment rubric
0/19Requirements & Scope
Core Architecture
Data Model & APIs
Deep Dives & Trade-offs
Communication
Solution
Sign in to get AI feedback on your answer. Your work is saved while you do.
Sign in to evaluate