PriceSanityCheckResult

Documentation for eth_defi.gmx.price_sanity.PriceSanityCheckResult Python class.

class PriceSanityCheckResult

Bases: object

Result of price sanity check comparison.

Attributes summary

passed

Whether the check passed (deviation within threshold)

deviation_percent

Deviation as decimal (0.045 = 4.5%)

oracle_price_usd

Oracle price in USD

ticker_price_usd

Ticker price in USD

action_taken

Action taken based on configuration

token_address

Token address that was checked

timestamp

Timestamp when check was performed

reason

Optional reason for failure (e.g., "ticker_fetch_failed")

Methods summary

__init__(passed, deviation_percent, ...[, ...])

passed: bool

Whether the check passed (deviation within threshold)

deviation_percent: float

Deviation as decimal (0.045 = 4.5%)

oracle_price_usd: float

Oracle price in USD

ticker_price_usd: float

Ticker price in USD

action_taken: eth_defi.gmx.price_sanity.PriceSanityAction

Action taken based on configuration

token_address: str

Token address that was checked

timestamp: datetime.datetime

Timestamp when check was performed

reason: Optional[str]

Optional reason for failure (e.g., “ticker_fetch_failed”)

__init__(passed, deviation_percent, oracle_price_usd, ticker_price_usd, action_taken, token_address, timestamp, reason=None)
Parameters
Return type

None