fetch_valid_coingecko_ids

Documentation for eth_defi.feed.stablecoin_rate.fetch_valid_coingecko_ids function.

fetch_valid_coingecko_ids(coin_ids, timeout=20.0, progress_bar=False)

Validate CoinGecko coin ids against the canonical coins list endpoint.

CoinGecko web pages can redirect or fall back to search pages for stale slugs. The collector therefore validates ids with the API before exporting coingecko_id or deriving a human-readable coingecko_link.

Parameters
  • coin_ids (Sequence[str]) – CoinGecko ids to validate.

  • timeout (float) – HTTP request timeout in seconds.

  • progress_bar (bool) – Show a tqdm progress bar for validation requests.

Returns

Set of ids that resolved to real CoinGecko coins.

Return type

set[str]