PortfolioHistory
Documentation for eth_defi.hyperliquid.vault.PortfolioHistory Python class.
- class PortfolioHistory
Bases:
objectHistorical 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
Time period identifier (day, week, month, allTime)
Account value history as list of (timestamp, value) tuples
PNL history as list of (timestamp, pnl) tuples
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
period (str) –
account_value_history (list[tuple[datetime.datetime, decimal.Decimal]]) –
pnl_history (list[tuple[datetime.datetime, decimal.Decimal]]) –
volume (decimal.Decimal) –
- Return type
None