A stock exchange is a centralized marketplace where buyers and sellers trade financial instruments like stocks, bonds, and derivatives. It acts as an intermediary that matches buy orders with sell orders to facilitate trades.
Loading simulation...
The core function of a stock exchange is price discovery, determining the fair market price of a security based on supply and demand. When a buyer's price meets or exceeds a seller's price, a trade is executed.
Popular Examples: NYSE (New York Stock Exchange), NASDAQ, SENSE, Binance (for crypto)
In this chapter, we will explore the high-level design of a stock exchange system.
This problem tests your ability to design systems with ultra-low latency, high throughput, strong consistency, and fairness guarantees.
Let's start by clarifying the requirements: