web_programming.crypto_price_tracker

Fetch the current price of a cryptocurrency in USD using CoinGecko API.

Functions

crypto_price(→ float)

Return the current price of a cryptocurrency in USD using CoinGecko API.

Module Contents

web_programming.crypto_price_tracker.crypto_price(coin: str = 'bitcoin') float

Return the current price of a cryptocurrency in USD using CoinGecko API.

>>> isinstance(crypto_price("bitcoin"), float)
True
>>> isinstance(crypto_price("ethereum"), float)
True