HyperliquidFundingRate
Documentation for eth_defi.hyperliquid.api.HyperliquidFundingRate Python class.
- class HyperliquidFundingRate
Bases:
objectA single funding-rate observation from the
fundingHistoryendpoint.Hyperliquid pays funding every hour at 1/8 of the computed 8-hour funding rate, so one of these dataclasses represents the funding charge/payment for a single 1-hour window. Authoritative reference for the cadence and formula: https://hyperliquid.gitbook.io/hyperliquid-docs/trading/funding
Funding rate and premium are stored as
floatfor direct pandas/numpy compatibility.Attributes summary
Start of the 1-hour funding window, naive UTC datetime.
Base symbol, e.g.
Per-hour funding rate as a fraction (= 1/8 of the 8-hour-window rate).
Premium (index vs mark divergence) at the start of the interval.
Methods summary
__init__(timestamp, coin, funding_rate, premium)- timestamp: datetime.datetime
Start of the 1-hour funding window, naive UTC datetime.
- coin: str
Base symbol, e.g.
"BTC".
- funding_rate: float
Per-hour funding rate as a fraction (= 1/8 of the 8-hour-window rate). For example,
0.0000125= 1.25 bps charged over the hour starting attimestamp.
- premium: float
Premium (index vs mark divergence) at the start of the interval.
- __init__(timestamp, coin, funding_rate, premium)
- Parameters
timestamp (datetime.datetime) –
coin (str) –
funding_rate (float) –
premium (float) –
- Return type
None