pub fn parse_ws_funding_rate_update(
stats: &LighterMarketStats,
instrument: &InstrumentAny,
timestamp_ms: u64,
ts_init: UnixNanos,
) -> Result<FundingRateUpdate>Expand description
Parses a Lighter perpetual market-stat update into a funding-rate update.
Lighter exposes current_funding_rate as the estimate for the upcoming
payment. The funding_rate field is the last completed payment, so it is
not used for the streaming Nautilus update.
ยงErrors
Returns an error if the funding rate, event timestamp, or funding timestamp cannot be converted.