Skip to main content

parse_quote_from_price_change

Function parse_quote_from_price_change 

Source
pub fn parse_quote_from_price_change(
    quote: &PolymarketQuote,
    instrument_id: InstrumentId,
    price_precision: u8,
    size_precision: u8,
    last_quote: Option<&QuoteTick>,
    ts_event: UnixNanos,
    ts_init: UnixNanos,
) -> Result<Option<QuoteTick>>
Expand description

Parses a quote tick from a price change message using its best_bid/best_ask fields.

Returns None when either best_bid or best_ask is absent (empty book side). When last_quote is provided the opposite side’s size is carried forward instead of being set to zero, matching the Python adapter’s behavior.