GMXOrderVerificationResult

Documentation for eth_defi.gmx.verification.GMXOrderVerificationResult Python class.

class GMXOrderVerificationResult

Bases: object

Result 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

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)

size_delta_in_tokens

Size delta in tokens (raw value)

collateral_delta

Collateral delta amount (can be negative)

pnl_usd

Realised PnL in USD (converted to float)

price_impact_usd

Price impact in USD (converted to float)

is_long

Whether the position is long

position_key

Position key (if position was modified)

fees

Execution fees

reason

Error reason string (for failed orders)

reason_bytes

Raw error reason bytes

decoded_error

Decoded error message

error_selector

Error selector (4-byte hex string)

event_count

Number of GMX events in the transaction

event_names

List of event names found

Methods summary

__init__(success[, order_key, status, ...])

success: bool

Whether the order executed successfully

order_key: bytes | None

The order key (32-byte identifier)

status: Optional[Literal['executed', 'cancelled', 'frozen']]

Order status: “executed”, “cancelled”, or “frozen”

account: Optional[eth_typing.evm.HexAddress]

Account address that owns the order

execution_price: float | None

Execution price (converted to float USD)

size_delta_usd: float | None

Size delta in USD (converted to float)

size_delta_in_tokens: int | None

Size delta in tokens (raw value)

collateral_delta: int | None

Collateral delta amount (can be negative)

pnl_usd: float | None

Realised PnL in USD (converted to float)

price_impact_usd: float | None

Price impact in USD (converted to float)

is_long: bool | None

Whether the position is long

position_key: bytes | None

Position key (if position was modified)

fees: eth_defi.gmx.events.OrderFees | None

Execution fees

reason: str | None

Error reason string (for failed orders)

reason_bytes: bytes | None

Raw error reason bytes

decoded_error: str | None

Decoded error message

error_selector: str | None

Error selector (4-byte hex string)

event_count: int

Number of GMX events in the transaction

event_names: list[str]

List of event names found

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

None