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 fundingHistory Info endpoint. Hyperliquid pays funding every hour at 1/8 of the computed 8-hour rate, so HYPERLIQUID_FUNDING_HISTORY_LIMIT records ≈ 20 days per call. A 3-year history per symbol needs roughly 55 paginated requests. Callers needing long histories should use the higher-level strategycore.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.

Parameters
Returns

Funding-rate observations in ascending time order.

Return type

list[eth_defi.hyperliquid.api.HyperliquidFundingRate]