Search
⌘K
Get Premium
Common Problems
Design Robinhood
Real-time Updates
Try This Problem Yourself
Practice with guided hints and real-time feedback
Understanding the Problem
📈 What is Robinhood?
Robinhood is a commission-free trading platform for stocks, ETFs, options, and cryptocurrencies. It features real-time market data and basic order management. Robinhood isn't an exchange in its own right, but rather a stock broker; it routes trades through market makers ("exchanges") and is compensated by those exchanges via payment for order flow.
Background: Financial Markets
There's some basic financial terms to understand before jumping into this design:
- Symbol: An abbreviation used to uniquely identify a stock (e.g. META, AAPL). Also known as a "ticker".
- Order: An order to buy or sell a stock. Can be a market order or a limit order.
- Market Order: An order to trigger immediate purchase or sale of a stock at the current market price. Has no price target and just specifies a number of shares.
- Limit Order: An order to purchase or sell a stock at a specified price. Specifies a number of shares and a target price, and can sit on an exchange waiting to be filled or cancelled by the original creator of the order.
Outside of the above financial details, it's worth understanding the responsibilities of Robinhood as a business / system. Robinhood is a brokerage and interfaces with external entities that actually manage order filling / cancellation. This means that we're building a brokerage system that facilitates customer orders and provides a customer stock data. We are not building an exchange.
For the purposes of this problem, we can assume Robinhood is interfacing with an "exchange" that has the following capabilities:
- Order Processing: Synchronously places orders and cancels orders via request/response API.
- Trade Feed: Offers subscribing to a trade feed for symbols. "Pushes" data to the client every time a trade occurs, including the symbol, price per share, number of shares, and the orderId.
For this interview, the interviewer is offering up an external API (the exchange) to aid in building the system. As a candidate, it's in your best interest to briefly clarify the exchange interface (APIs, both synchronous and asynchronous) so you have an idea of the tools at your disposal. Typically, the assumptions you make about the interface have broad consequences in your design, so it's a good idea to align with the interviewer on the details.
Functional Requirements
Core Requirements
- Users can see live prices of stocks.
- Users can manage orders for stocks (market / limit orders, create / cancel orders).
Below the line (out of scope)
- Users can trade outside of market hours.
- Users can trade ETFs, options, crypto.
- Users can see the order book in real time.
This question focuses on stock viewing and ordering. It excludes advanced trading behaviors and doesn't primarily involve viewing historical stock or portfolio data. If you're unsure what features to focus on for a feature-rich app like Robinhood or similar, have some brief back and forth with the interviewer to figure out what part of the system they care the most about.
Non-Functional Requirements
The Set Up
Planning the Approach
Defining the Core Entities
The API
High-Level Design
1) Users can see live prices of stocks
2) Users can manage orders for stocks
Potential Deep Dives
1) How can the system scale up live price updates?
2) How does the system track order updates?
3) How does the system manage order consistency?
Some additional deep dives you might consider
What is Expected at Each Level?
Mid-level
Senior
Staff+
Currently up to 25% off
Hello Interview Premium
Reading Progress
On This Page
Understanding the Problem
Background: Financial Markets
Functional Requirements
Non-Functional Requirements
The Set Up
Planning the Approach
Defining the Core Entities
The API
High-Level Design
1) Users can see live prices of stocks
2) Users can manage orders for stocks
Potential Deep Dives
1) How can the system scale up live price updates?
2) How does the system track order updates?
3) How does the system manage order consistency?
Some additional deep dives you might consider
What is Expected at Each Level?
Mid-level
Senior
Staff+

Schedule a mock interview
Meet with a FAANG senior+ engineer or manager and learn exactly what it takes to get the job.