fetch_funding_history
Documentation for eth_defi.hyperliquid.api.fetch_funding_history function.
- fetch_funding_history(session, *, coin, start_time, end_time=None, timeout=30.0)
Fetch up to 500 funding-rate observations for a single coin.
Calls the
fundingHistoryInfo endpoint. Hyperliquid pays funding every hour at 1/8 of the computed 8-hour rate, soHYPERLIQUID_FUNDING_HISTORY_LIMITrecords ≈ 20 days per call. A 3-year history per symbol needs roughly 55 paginated requests. Callers needing long histories should use the higher-levelstrategycore.hyperliquid.fetch_funding_rate_history()wrapper, which handles pagination and parquet caching.Uses
HyperliquidSession.post_info()for automatic proxy rotation on rate-limit or connectivity failures.Funding cadence and formula: Hyperliquid Docs › Trading › Funding.
API endpoint: Info endpoint › fundingHistory.
- Parameters
session (eth_defi.hyperliquid.session.HyperliquidSession) – Session from
create_hyperliquid_session().coin (str) – Base symbol only, e.g.
"BTC".start_time (datetime.datetime) – Earliest funding observation, naive UTC datetime.
end_time (Optional[datetime.datetime]) – Optional latest observation, naive UTC datetime. If
None, the API returns up to 500 records starting atstart_time.timeout (float) – HTTP request timeout in seconds.
- Returns
Funding-rate observations in ascending time order.
- Return type