Namespace Virtufin.Base.OrderBooks
Classes
- L2OrderBook<A, L>
In-memory Level-2 order book: two sorted ladders of aggregate size keyed by price. Pure state — no I/O, no CloudEvents, not thread-safe.
- Level2OrderBookUpdater<TBook, A, L, S, D>
Applies Level-2 snapshots and diffs to an L2OrderBook<A, L> using the standard local-order-book-maintenance algorithm: bootstrap from a snapshot, then apply diffs whose first update id brackets the book's previous last update id. A zero size removes a level.
Interfaces
- IL2OrderBookWriter<A, L>
Mutable surface of an IL2OrderBook<A, L>, used by Level2OrderBookUpdater<TBook, A, L, S, D>. Kept separate from the read-only Core trait so consumers of a book cannot mutate it by accident.