GMXOrderVerificationResult
Documentation for eth_defi.gmx.verification.GMXOrderVerificationResult Python class.
- class GMXOrderVerificationResult
Bases:
objectResult of GMX order execution verification.
This dataclass contains the verification result and extracted execution details from GMX events.
- Variables
success – Whether the order executed successfully
order_key – The order key (32-byte identifier)
status – Order status: “executed”, “cancelled”, or “frozen”
account – Account address that owns the order
execution_price – Execution price (converted to float USD)
size_delta_usd – Size delta in USD (converted to float)
pnl_usd – Realised PnL in USD (converted to float)
price_impact_usd – Price impact in USD (converted to float)
fees – Execution fees from GMX
reason – Error reason string (for failed orders)
decoded_error – Decoded error message
error_selector – 4-byte error selector hex string
event_count – Number of GMX events in the transaction
event_names – List of event names found
Attributes summary
Whether the order executed successfully
The order key (32-byte identifier)
Order status: "executed", "cancelled", or "frozen"
Account address that owns the order
Execution price (converted to float USD)
Size delta in USD (converted to float)
Size delta in tokens (raw value)
Collateral delta amount (can be negative)
Realised PnL in USD (converted to float)
Price impact in USD (converted to float)
Whether the position is long
Position key (if position was modified)
Execution fees
Error reason string (for failed orders)
Raw error reason bytes
Decoded error message
Error selector (4-byte hex string)
Number of GMX events in the transaction
List of event names found
Methods summary
__init__(success[, order_key, status, ...])- success: bool
Whether the order executed successfully
- status: Optional[Literal['executed', 'cancelled', 'frozen']]
Order status: “executed”, “cancelled”, or “frozen”
- account: Optional[eth_typing.evm.HexAddress]
Account address that owns the order
- fees: eth_defi.gmx.events.OrderFees | None
Execution fees
- event_count: int
Number of GMX events in the transaction
- __init__(success, order_key=None, status=None, account=None, execution_price=None, size_delta_usd=None, size_delta_in_tokens=None, collateral_delta=None, pnl_usd=None, price_impact_usd=None, is_long=None, position_key=None, fees=None, reason=None, reason_bytes=None, decoded_error=None, error_selector=None, event_count=0, event_names=<factory>)
- Parameters
success (bool) –
order_key (bytes | None) –
status (Optional[Literal['executed', 'cancelled', 'frozen']]) –
account (Optional[eth_typing.evm.HexAddress]) –
execution_price (float | None) –
size_delta_usd (float | None) –
size_delta_in_tokens (int | None) –
collateral_delta (int | None) –
pnl_usd (float | None) –
price_impact_usd (float | None) –
is_long (bool | None) –
position_key (bytes | None) –
fees (eth_defi.gmx.events.OrderFees | None) –
reason (str | None) –
reason_bytes (bytes | None) –
decoded_error (str | None) –
error_selector (str | None) –
event_count (int) –
- Return type
None