Skip to content

Instantly share code, notes, and snippets.

@KenoLeon
Created May 11, 2022 20:24
Show Gist options
  • Select an option

  • Save KenoLeon/4ba92f1d2fe1e2213390f3f93597f18f to your computer and use it in GitHub Desktop.

Select an option

Save KenoLeon/4ba92f1d2fe1e2213390f3f93597f18f to your computer and use it in GitHub Desktop.
coingecko api call
from pycoingecko import CoinGeckoAPI
cg = CoinGeckoAPI()
currentBTCPrice = cg.get_price(ids='bitcoin', vs_currencies='usd')
print(currentBTCPrice)
# >> {'bitcoin': {'usd': 29202}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment