AccountTradeHistory
Documentation for eth_defi.hyperliquid.trade_history.AccountTradeHistory Python class.
- class AccountTradeHistory
Bases:
objectComplete trade history snapshot for a Hyperliquid account.
Combines current open positions, historical closed trades, open trades, all fills, and funding payments into a single result.
Attributes summary
Account address (vault or user)
Timestamp when this snapshot was taken
Current open positions from clearinghouse state
Historical closed round-trip trades
Currently open round-trip trades
All individual fills in the time range
All funding payments in the time range
Perp account margin summary
Time range start
Time range end
Whether the fill history was truncated by the 10K API limit
Methods summary
__init__(address, snapshot_time, ...)- address: eth_typing.evm.HexAddress
Account address (vault or user)
- snapshot_time: datetime.datetime
Timestamp when this snapshot was taken
- open_positions: list[eth_defi.hyperliquid.api.AssetPosition]
Current open positions from clearinghouse state
- closed_trades: list[eth_defi.hyperliquid.trade_history.RoundTripTrade]
Historical closed round-trip trades
- open_trades: list[eth_defi.hyperliquid.trade_history.RoundTripTrade]
Currently open round-trip trades
- fills: list[eth_defi.hyperliquid.position.Fill]
All individual fills in the time range
- funding_payments: list[eth_defi.hyperliquid.trade_history.FundingPayment]
All funding payments in the time range
- margin_summary: eth_defi.hyperliquid.api.MarginSummary
Perp account margin summary
- start_time: datetime.datetime
Time range start
- end_time: datetime.datetime
Time range end
- fills_truncated: bool
Whether the fill history was truncated by the 10K API limit
- __init__(address, snapshot_time, open_positions, closed_trades, open_trades, fills, funding_payments, margin_summary, start_time, end_time, fills_truncated)
- Parameters
address (eth_typing.evm.HexAddress) –
snapshot_time (datetime.datetime) –
open_positions (list[eth_defi.hyperliquid.api.AssetPosition]) –
closed_trades (list[eth_defi.hyperliquid.trade_history.RoundTripTrade]) –
open_trades (list[eth_defi.hyperliquid.trade_history.RoundTripTrade]) –
fills (list[eth_defi.hyperliquid.position.Fill]) –
funding_payments (list[eth_defi.hyperliquid.trade_history.FundingPayment]) –
margin_summary (eth_defi.hyperliquid.api.MarginSummary) –
start_time (datetime.datetime) –
end_time (datetime.datetime) –
fills_truncated (bool) –
- Return type
None