Skip to content

tcmarkfeld/PriceTime

Repository files navigation

PriceTime

PriceTime is an in-memory matching engine prototype.

What repo currently does

  • Maintains limit order books in memory.
  • Supports bids/asks with price priority and FIFO within each price level.
  • Supports order lifecycle operations:
    • add
    • cancel
    • modify (quantity and optional price)
  • Matches incoming orders against resting liquidity:
    • limit orders (must cross)
    • market orders (consume available liquidity)
  • Produces trades using resting order price.
  • Supports multiple instruments via separate order books per instrument.
  • Uses per-book locking for safe concurrent submissions.
  • Includes deterministic unit tests for:
    • order book behavior
    • matching correctness
    • multi-instrument isolation
    • basic concurrency safety

What will be added next

  • Instrument rule enforcement (tick size, lot size, min size).
  • Stronger validation around reject reasons and error reporting.
  • Deterministic clock/sequence source for execution timestamps.
  • Better observability (structured logging + execution diagnostics).
  • Persistence boundary (interfaces for event/snapshot storage, still no DB coupling in core).
  • Replay/snapshot support for fast warm start and reproducible backtests.
  • Higher-volume concurrency and stress test coverage.

About

Price-time priority order matching engine for .NET with Kafka-driven order submission, trade execution, and real-time order book management.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors