DocsOrderbook
Learning Path00 Start Here01 Big Picture
IntroductionWhat Is an Order BookBids and AsksSpread and Mid PriceLimit OrdersMarket OrdersDepth and Liquidity
Matching Engine Basics02 Core Domain03 Matching Flow05 Guided Exercises06 Visual Guide07 Why This Design08 Performance Bridge
ArchitectureTechnical ArchitectureUI Notes and Terminal Ideas
Engine Performance NotesPerformance
Milestones
Glossary
LearnTerminal
DocsProject

Milestones

The implementation phases and where the project stands today.

Milestones

This repository follows the implementation order defined in the handoff docs.

Phase 1

Scaffold the crate structure, docs, module tree, dependencies, and README baseline.

Phase 2

Implement the core domain language:

  • market and order identifiers
  • sequence numbers
  • exact price and quantity types
  • order request, stored order, trade, and market config

Phase 3

Implement typed validation and error handling for:

  • market config consistency
  • order submission requests
  • tick size and lot size alignment
  • price and quantity precision

Phase 4

Implement deterministic book state:

  • price levels
  • bid and ask side storage
  • top-of-book helpers
  • snapshots
  • invariant checks

Phase 5

Implement matching behavior:

  • resting limit orders
  • crossing limit orders
  • market order sweeps
  • partial fills
  • event emission
  • structured submission results

Phase 6

Implement cancellation:

  • cancel by order ID
  • eager cleanup
  • cancellation events
  • missing-order handling

Phase 7

Implement unit and integration tests for matching rules, FIFO, market orders, partial fills, snapshots, and invariants.

Phase 8

Finish the example flow, doc synchronization, and repository quality gates.

Current status

The first production baseline in this repository covers all eight phases for the MVP scope, including a benchmark scaffold. Future work should extend the engine only after preserving the documented invariants and deterministic event model.

PreviousNext
On This Page9
Phase 1Phase 2Phase 3Phase 4Phase 5Phase 6Phase 7Phase 8Current status