OrderExecutionResult
Documentation for eth_defi.gmx.events.OrderExecutionResult Python class.
- class OrderExecutionResult
Bases:
objectResult of GMX order execution.
This dataclass aggregates information from order execution events (OrderExecuted, OrderFrozen, OrderCancelled) and position events (PositionIncrease, PositionDecrease).
Attributes summary
The order key (32-byte identifier)
Execution status
Account address that owns the order
Execution price (30 decimal precision)
Size delta in USD (30 decimal precision)
Size delta in tokens
Collateral delta amount (can be negative for decreases)
Realised PnL in USD (30 decimal precision, for decrease orders)
Price impact in USD (30 decimal precision)
Execution fees
Error reason string (for frozen/cancelled orders)
Raw error reason bytes (for frozen/cancelled orders)
Decoded error message from reason_bytes
Position key (if position was modified)
Whether the position is long
Methods summary
__init__(order_key, status[, account, ...])- order_key: bytes
The order key (32-byte identifier)
- status: Literal['executed', 'frozen', 'cancelled']
Execution status
- account: Optional[eth_typing.evm.HexAddress]
Account address that owns the order
- fees: eth_defi.gmx.events.OrderFees | None
Execution fees
- __init__(order_key, status, account=None, execution_price=None, size_delta_usd=None, size_delta_in_tokens=None, collateral_delta=None, pnl_usd=None, price_impact_usd=None, fees=None, reason=None, reason_bytes=None, decoded_error=None, position_key=None, is_long=None)
- Parameters
order_key (bytes) –
status (Literal['executed', 'frozen', 'cancelled']) –
account (Optional[eth_typing.evm.HexAddress]) –
execution_price (int | None) –
size_delta_usd (int | None) –
size_delta_in_tokens (int | None) –
collateral_delta (int | None) –
pnl_usd (int | None) –
price_impact_usd (int | None) –
fees (eth_defi.gmx.events.OrderFees | None) –
reason (str | None) –
reason_bytes (bytes | None) –
decoded_error (str | None) –
position_key (bytes | None) –
is_long (bool | None) –
- Return type
None