Skip to main content

parse_funding_rate

Function parse_funding_rate 

Source
pub fn parse_funding_rate(
    msg: &DeriveTickerMsg,
    ts_init: UnixNanos,
) -> Result<Option<FundingRateUpdate>>
Expand description

Parses a perpetual ticker payload into a [FundingRateUpdate].

Returns Ok(None) when the ticker does not carry funding.

ยงErrors

Returns an error when the ticker timestamp is negative or overflows.