INNER CODE UNIT · Python
_fetch_coin_information
cunarist/solie · package/solie/window/main.py:228
async def _fetch_coin_information(self) -> dict[str, dict[str, Any]]:
"""Fetch coin information from CoinGecko API."""
api_requester = ApiRequester()
response = await api_requester.coingecko(
"GET",
"/api/v3/coins/markets",
{
"vs_currency": "usd",
},
)
coin_names: dict[str, str] = {}
coin_icon_urls: dict[str, str] = {}
coin_ranks: dict[str, int] = {}
for about_coin in response:
raw_symbol: str = about_coin["symbol"]
coin_symbol = raw_symbol.upper()