Skip to main content

Module quotes

Module quotes 

Source
Expand description

Price observations: the scalar market observable pricing consumes.

A Quote is what the pricing layer reads — a mark. It is deliberately not an order book: trading systems keep the book (ladders, order-by-order churn) in the execution layer and hand pricing a derived observable. The book-shaped sibling is MarketDepth, which lives under its own market key and produces a Quote at the snapshot boundary.

Derived values (mid, spread, microprice) are functions, never fields — a stored mid can disagree with the bid/ask it came from; a computed one cannot. Representation is private by construction (enum variants are matched, not assigned), so richer quote shapes can be added without touching pricing call sites: engines only call mid.

Enums§

Quote
One price observation for one instrument, in increasing order of structure. Pricing reads mid regardless of variant; the richer variants exist so marking policies (bid/ask-side marks, microprice) have honest inputs when a trading system supplies them.