StablecoinRateTarget
Documentation for eth_defi.feed.stablecoin_rate.StablecoinRateTarget Python class.
- class StablecoinRateTarget
Bases:
objectOne stablecoin YAML entry that may be refreshed from CoinGecko.
Attributes summary
yaml_pathentry_indexslugsymbolcategorynamecoingecko_idcoingecko_linkcoingecko_id_sourcecoingecko_id_verified_atcoingecko_id_verification_failed_atcoingecko_id_verification_failed_reasonCurated source currency ticker read from
eth_defi.stablecoin_metadata.StablecoinMetadata.Source of
source_currency.USD per one
source_currencyunit from the local currency database.Calendar date of
source_currency_usd_rate.Naive UTC timestamp when
source_currency_usd_ratewas read.Currency API source column used for
source_currency_usd_rate.peg_currencyusd_rateusd_rate_fetched_atusd_rate_updated_atpeg_ratepeg_rate_currencyrate_fetch_failed_atrate_fetch_failed_reasondepegged_atcontract_addressesThe ticker is reused by unrelated tokens, so never match this entry by symbol — only by contract address.
The token has no ERC-20 deployment on any chain we index, so it can never denominate an EVM vault and there is nothing to blacklist.
Methods summary
__init__(yaml_path, entry_index, slug, ...)- source_currency: Optional[str]
Curated source currency ticker read from
eth_defi.stablecoin_metadata.StablecoinMetadata.
- source_currency_source: Optional[str]
Source of
source_currency. Onlymanualvalues drive depeg checks.
- source_currency_usd_rate: Optional[float]
USD per one
source_currencyunit from the local currency database.
- source_currency_usd_rate_date: Optional[datetime.date]
Calendar date of
source_currency_usd_rate.
- source_currency_usd_rate_fetched_at: Optional[datetime.datetime]
Naive UTC timestamp when
source_currency_usd_ratewas read.
- source_currency_usd_rate_source: Optional[str]
Currency API source column used for
source_currency_usd_rate.
- ambiguous_symbol: bool
The ticker is reused by unrelated tokens, so never match this entry by symbol — only by contract address. Set
ambiguous_symbol: truein the YAML for tickers such assUSDorUSDRthat several distinct tokens share, otherwise marking one depegged would blacklist the healthy ones.
- non_evm: bool
The token has no ERC-20 deployment on any chain we index, so it can never denominate an EVM vault and there is nothing to blacklist. Set
non_evm: truein the YAML for natively non-EVM tokens (e.g. Acala aUSD on Polkadot, Kava USDX on Cosmos) to silence the otherwise-unactionable depeg warning, which nocontract_addressesentry could ever resolve.
- __init__(yaml_path, entry_index, slug, symbol, category, name, coingecko_id, coingecko_link, coingecko_id_source, coingecko_id_verified_at, coingecko_id_verification_failed_at, coingecko_id_verification_failed_reason, source_currency, source_currency_source, source_currency_usd_rate, source_currency_usd_rate_date, source_currency_usd_rate_fetched_at, source_currency_usd_rate_source, peg_currency, usd_rate, usd_rate_fetched_at, usd_rate_updated_at, peg_rate, peg_rate_currency, rate_fetch_failed_at, rate_fetch_failed_reason, depegged_at, contract_addresses, ambiguous_symbol=False, non_evm=False)
- Parameters
yaml_path (pathlib.Path) –
slug (str) –
symbol (str) –
category (str) –
name (str) –
coingecko_id_verified_at (Optional[datetime.datetime]) –
coingecko_id_verification_failed_at (Optional[datetime.datetime]) –
source_currency_usd_rate_date (Optional[datetime.date]) –
source_currency_usd_rate_fetched_at (Optional[datetime.datetime]) –
usd_rate_fetched_at (Optional[datetime.datetime]) –
usd_rate_updated_at (Optional[datetime.datetime]) –
rate_fetch_failed_at (Optional[datetime.datetime]) –
depegged_at (Optional[datetime.datetime]) –
ambiguous_symbol (bool) –
non_evm (bool) –
- Return type
None