System design interview questionHard
Bloomberg

Design a Stock Exchange

Design an exchange that accepts orders, matches buyers and sellers, publishes market data, and preserves an auditable sequence of trades.

1. Problem Statement

Design a stock exchange that accepts buy and sell orders, matches them fairly, and distributes market data in real time.

2. Architecture Discussion Map

Use this as one discussion aid, not a single correct answer. Your design should follow from the requirements, scale, and trade-offs you establish.

Rendering architecture diagram...
Mermaid Source (For AI Bots)
graph LR
    A["Design a Stock Exchange"]
    A --> F1["Order types and matching rules"]
    A --> F2["Sequencing and deterministic processing"]
    A --> F3["Market data fan-out"]
    A --> F4["Durability, replay, and audit"]
    A --> F5["Risk controls and failure recovery"]

3. Key Focus Areas

  • 1
    Order types and matching rules
  • 2
    Sequencing and deterministic processing
  • 3
    Market data fan-out
  • 4
    Durability, replay, and audit
  • 5
    Risk controls and failure recovery

4. What the Interviewer Looks For

The interviewer probes these areas, and the report grades the interview against them.

  • Requirements and capacity
  • Sequencing and deterministic matching
  • Durability, failover, and audit
  • Market data distribution
  • Risk controls and fairness

5. What Strong Candidates Should Demonstrate

  • Separate order entry, deterministic matching, market data, and post-trade processing.
  • Preserve strict ordering and auditability on the matching path.
  • Reason about partitions, recovery, and fairness under low-latency constraints.

Want interactive feedback?

Practice drawing this system component-by-component on a live whiteboard while the interviewer probes at your target level.

Continue to Dashboard

Core Concepts

Order MatchingLow LatencyEvent OrderingAuditability

Continue preparing

Build a complete software engineer mock interview plan

Related System Design

Design a Cross-Product Tagging System

Design a shared tagging service that lets users apply tags to entities across multiple Atlassian products, with consistent search and deduplication.