Skip to main content

parse_ws_open_interest

Function parse_ws_open_interest 

Source
pub fn parse_ws_open_interest(
    open_interest: Decimal,
    instrument: &InstrumentAny,
    ts_init: UnixNanos,
) -> Result<HyperliquidOpenInterest>
Expand description

Parses an activeAssetCtx open interest string into an open interest custom data update.

The caller is responsible for restricting this to the perpetual branch; spot activeAssetCtx payloads carry no open interest field.