PositionEvent

Documentation for eth_defi.hyperliquid.position.PositionEvent Python class.

class PositionEvent

Bases: object

Represents a position change event reconstructed from fill data.

Position events are derived by processing fills chronologically and detecting when positions are opened, closed, increased, or decreased.

Attributes summary

event_type

coin

direction

size

price

timestamp

position_after

realized_pnl

fill_hash

order_id

trade_id

fee

fee_token

Methods summary

__init__(event_type, coin, direction, size, ...)

__init__(event_type, coin, direction, size, price, timestamp, position_after, realized_pnl=None, fill_hash=None, order_id=None, trade_id=None, fee=None, fee_token=None)
Parameters
Return type

None