PortfolioHistory

Documentation for eth_defi.hyperliquid.vault.PortfolioHistory Python class.

class PortfolioHistory

Bases: object

Historical portfolio data for a specific time period.

Contains account value history, PNL history, and trading volume for a given period (day, week, month, or allTime).

Attributes summary

period

Time period identifier (day, week, month, allTime)

account_value_history

Account value history as list of (timestamp, value) tuples

pnl_history

PNL history as list of (timestamp, pnl) tuples

volume

Trading volume for the period (USD)

Methods summary

__init__(period, account_value_history, ...)

period: str

Time period identifier (day, week, month, allTime)

account_value_history: list[tuple[datetime.datetime, decimal.Decimal]]

Account value history as list of (timestamp, value) tuples

pnl_history: list[tuple[datetime.datetime, decimal.Decimal]]

PNL history as list of (timestamp, pnl) tuples

volume: decimal.Decimal

Trading volume for the period (USD)

__init__(period, account_value_history, pnl_history, volume)
Parameters
Return type

None