Expand description
Limit-order-book depth: the execution-layer observable.
Pricing never walks a ladder — it reads a Quote mark. Execution
analytics (slippage, liquidation value, sizing) do walk it. Keeping
MarketDepth as a sibling of Quote under its own market key
(Depth) preserves that layering: a
trading system publishes the book here and the top-of-book collapses
into a Quote at the snapshot boundary ([to_quote]
(MarketDepth::to_quote)); the pricing layer never changes.
Scenario shocks do not rewrite ladders: bump the pricing observables
(Spot), let the adapter republish depth.
Structs§
- Depth
Level - One book level: a price and the size displayed at it.
- Market
Depth - A price-aggregated (L2) snapshot of one instrument’s book: bids best (highest) first, asks best (lowest) first. Validated on construction — sorted sides, positive finite sizes, uncrossed top — so consumers can walk it without re-checking.