AccountTradeHistory

Documentation for eth_defi.hyperliquid.trade_history.AccountTradeHistory Python class.

class AccountTradeHistory

Bases: object

Complete 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

address

Account address (vault or user)

snapshot_time

Timestamp when this snapshot was taken

open_positions

Current open positions from clearinghouse state

closed_trades

Historical closed round-trip trades

open_trades

Currently open round-trip trades

fills

All individual fills in the time range

funding_payments

All funding payments in the time range

margin_summary

Perp account margin summary

start_time

Time range start

end_time

Time range end

fills_truncated

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
Return type

None