Cryptocurrency API client for fetching market price.
Python >= 3.8
pip install coinprecio
api(api_key, backend="coinmarketcap", symbol="BTC", currency="USD")
from coinprecio import api
api_key = "YOUR_API_KEY"
coinapi = api(api_key)
# get price for the initialized symbol
btc_price = coinapi.get_price()
# get price dict for all supported symbols
prices = coinapi.get_price_all()
Note: api_key should be associated with the respective backend/API service.
- coinmarketcap
- BTC
- ETH
- SOL
- BCH
- LTC
- USD
- EUR
- JPY
- GBP
Distributed under the MIT License. See the accompanying file LICENSE.