pub fn load_funding_rates<P: AsRef<Path>>(
filepath: P,
instrument_id: Option<InstrumentId>,
limit: Option<usize>,
) -> Result<Vec<FundingRateUpdate>, Box<dyn Error>>
Expand description
Loads FundingRateUpdate
s from a Tardis format derivative ticker CSV at the given filepath
,
automatically applying GZip
decompression for files ending in “.gz”.
This function parses the funding_rate
, predicted_funding_rate
, and funding_timestamp
fields from derivative ticker data to create funding rate updates.
§Errors
Returns an error if the file cannot be opened, read, or parsed as CSV.