GMXHistoricalSharePriceObservation
Documentation for eth_defi.gmx.historical_oracle.GMXHistoricalSharePriceObservation Python class.
- class GMXHistoricalSharePriceObservation
Bases:
objectOne GM or GLV value-and-supply observation.
MarketPoolValueUpdatedcontains GM value and supply after a deposit. Withdrawal-context observations are excluded because GMX uses different valuation parameters for withdrawals.GlvValueUpdatedcontains 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
EVM chain where GMX emitted the observation.
Block containing the valuation event.
Unix timestamp of the valuation block.
Emitting transaction hash.
Log position inside its block.
GM market token or GLV share token.
USD GM market or GLV value using GMX's 30-decimal precision.
ERC-20 share supply using 18-decimal precision.
MarketPoolValueUpdatedorGlvValueUpdated.Return the supply-normalised USD value per share.
Return the USD product value in decimal units.
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
MarketPoolValueUpdatedorGlvValueUpdated.
- 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)