pub fn parse_instrument_msg(
msg: BitmexInstrumentMsg,
instruments_cache: &AHashMap<Ustr, InstrumentAny>,
ts_init: UnixNanos,
) -> Vec<Data>Expand description
Parse a BitMEX WebSocket instrument message for mark and index prices.
For index symbols (e.g., .BXBT):
- Uses the
lastPricefield as the index price. - Also emits the
markPricefield (which equalslastPricefor indices).
For regular instruments:
- Uses the
index_pricefield for index price updates. - Uses the
mark_pricefield for mark price updates.
Returns a Vec of Data containing mark and/or index price updates or an empty Vec if no relevant price is present.