GMXHistoricalSharePriceObservation

Documentation for eth_defi.gmx.historical_oracle.GMXHistoricalSharePriceObservation Python class.

class GMXHistoricalSharePriceObservation

Bases: object

One GM or GLV value-and-supply observation.

MarketPoolValueUpdated contains GM value and supply after a deposit. Withdrawal-context observations are excluded because GMX uses different valuation parameters for withdrawals. GlvValueUpdated contains GLV value and supply after execution; GLV minting and burning use the pre-flow ratio, so updating both numerator and denominator does not mechanically rebase the existing holders’ claim.

Attributes summary

chain_id

EVM chain where GMX emitted the observation.

block_number

Block containing the valuation event.

block_timestamp

Unix timestamp of the valuation block.

transaction_hash

Emitting transaction hash.

log_index

Log position inside its block.

product_address

GM market token or GLV share token.

raw_value

USD GM market or GLV value using GMX's 30-decimal precision.

raw_supply

ERC-20 share supply using 18-decimal precision.

event_name

MarketPoolValueUpdated or GlvValueUpdated.

share_price

Return the supply-normalised USD value per share.

total_assets

Return the USD product value in decimal units.

total_supply

Return the ERC-20 share supply in decimal units.

Methods summary

__init__(chain_id, block_number, ...)

chain_id: int

EVM chain where GMX emitted the observation.

block_number: int

Block containing the valuation event.

block_timestamp: int

Unix timestamp of the valuation block.

transaction_hash: str

Emitting transaction hash.

log_index: int

Log position inside its block.

product_address: eth_typing.evm.HexAddress

GM market token or GLV share token.

raw_value: int

USD GM market or GLV value using GMX’s 30-decimal precision.

raw_supply: int

ERC-20 share supply using 18-decimal precision.

event_name: str

MarketPoolValueUpdated or GlvValueUpdated.

property total_assets: decimal.Decimal

Return the USD product value in decimal units.

property total_supply: decimal.Decimal

Return the ERC-20 share supply in decimal units.

property share_price: decimal.Decimal

Return the supply-normalised USD value per share.

__init__(chain_id, block_number, block_timestamp, transaction_hash, log_index, product_address, raw_value, raw_supply, event_name)
Parameters
Return type

None