pub fn parse_quote_tick(
instrument_id: InstrumentId,
bid_price: Option<f64>,
ask_price: Option<f64>,
bid_size: Option<f64>,
ask_size: Option<f64>,
price_precision: u8,
size_precision: u8,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> Result<QuoteTick>Expand description
Parse IB tick price and size data into a QuoteTick.
This builds a quote from individual tick updates. You typically need to accumulate bid/ask prices and sizes from multiple tick updates before creating a QuoteTick.
§Arguments
instrument_id- The instrument identifierbid_price- Bid price (if available)ask_price- Ask price (if available)bid_size- Bid size (if available)ask_size- Ask size (if available)price_precision- Price precision for the instrumentsize_precision- Size precision for the instrumentts_event- Event timestampts_init- Initialization timestamp
§Errors
Returns an error if price or size conversion fails.