PriceSanityCheckResult
Documentation for eth_defi.gmx.price_sanity.PriceSanityCheckResult Python class.
- class PriceSanityCheckResult
Bases:
objectResult of price sanity check comparison.
Attributes summary
Whether the check passed (deviation within threshold)
Deviation as decimal (0.045 = 4.5%)
Oracle price in USD
Ticker price in USD
Action taken based on configuration
Token address that was checked
Timestamp when check was performed
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
passed (bool) –
deviation_percent (float) –
oracle_price_usd (float) –
ticker_price_usd (float) –
action_taken (eth_defi.gmx.price_sanity.PriceSanityAction) –
token_address (str) –
timestamp (datetime.datetime) –
- Return type
None