Skip to content
vasu edited this page Dec 10, 2025 · 2 revisions

Stock Exchange

Purpose

This project implements the core systems of an electronic stock exchange. Its responsibility is to accept orders from market participants, maintain the authoritative limit order books for listed symbols, execute trades using strict price–time priority, and publish market data derived directly from executed and resting orders.

The system is designed to provide deterministic execution, fair access, low latency, and recoverability under failure conditions.

Scope of the Stock Exchange

Within this system, the Stock Exchange is responsible for:

  • Accepting and validating participant orders
  • Maintaining the canonical state of all order books
  • Determining trade executions
  • Publishing official market data
  • Persisting all state transitions for audit and replay
  • Recovering deterministically after failure

This system does not model broker-side risk, clearing, settlement, or custody.

Clone this wiki locally