HyperliquidFundingRate

Documentation for eth_defi.hyperliquid.api.HyperliquidFundingRate Python class.

class HyperliquidFundingRate

Bases: object

A single funding-rate observation from the fundingHistory endpoint.

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 float for direct pandas/numpy compatibility.

Attributes summary

timestamp

Start of the 1-hour funding window, naive UTC datetime.

coin

Base symbol, e.g.

funding_rate

Per-hour funding rate as a fraction (= 1/8 of the 8-hour-window rate).

premium

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 at timestamp.

premium: float

Premium (index vs mark divergence) at the start of the interval.

__init__(timestamp, coin, funding_rate, premium)
Parameters
Return type

None