pub fn parse_realtime_bar(
bar_type: BarType,
open: f64,
high: f64,
low: f64,
close: f64,
volume: f64,
price_precision: u8,
size_precision: u8,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> Result<Bar>Expand description
Parse IB real-time bar data into a Bar.
§Arguments
bar_type- The bar type specificationopen- Opening pricehigh- High pricelow- Low priceclose- Closing pricevolume- Volumeprice_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.