Skip to main content

parse_ticker_quote

Function parse_ticker_quote 

Source
pub fn parse_ticker_quote(
    msg: &DeriveTickerMsg,
    price_precision: u8,
    size_precision: u8,
    ts_init: UnixNanos,
) -> Result<QuoteTick>
Expand description

Parses a ticker message into a Nautilus top-of-book quote.

Pass price and size precision from the instrument definition rather than inferring them from the wire values, since Derive may trim trailing zeroes.

ยงErrors

Returns an error when price, size, or timestamp conversion fails.