HyperliquidCandle

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

class HyperliquidCandle

Bases: object

A single OHLCV candle from the candleSnapshot Info endpoint.

Prices and volume are stored as float for direct pandas/numpy compatibility in backtesting notebooks. Callers needing arbitrage-level precision should consume the raw API response instead.

Attributes summary

open_time

Open time, naive UTC datetime.

close_time

Close time, naive UTC datetime.

coin

Base symbol, e.g.

interval

Candle interval, one of "1m", "5m", "15m", "1h", "4h", "1d"

open

high

low

close

volume

Base-asset volume.

trades

Number of trades that formed this candle.

Methods summary

__init__(open_time, close_time, coin, ...)

open_time: datetime.datetime

Open time, naive UTC datetime.

close_time: datetime.datetime

Close time, naive UTC datetime.

coin: str

Base symbol, e.g. "BTC".

interval: str

Candle interval, one of "1m", "5m", "15m", "1h", "4h", "1d"

volume: float

Base-asset volume. Zero for pre-launch (backfilled) candles.

trades: int

Number of trades that formed this candle.

__init__(open_time, close_time, coin, interval, open, high, low, close, volume, trades)
Parameters
Return type

None