Skip to main content

parse_funding_rate

Function parse_funding_rate 

Source
pub fn parse_funding_rate(data: &Value, symbol: &str) -> Result<FundingRate>
Expand description

Parse funding rate data from OKX public funding-rate response.

OKX funding rate fields:

  • instId: instrument ID
  • fundingRate: current funding rate
  • fundingTime: next funding time
  • nextFundingRate: estimated next funding rate
  • nextFundingTime: next funding settlement time

§Arguments

  • data - OKX funding rate data JSON object
  • symbol - Unified symbol string

§Returns

Returns a CCXT [FundingRate] structure.