Skip to content

Instantly share code, notes, and snippets.

@oskarsh
Created June 19, 2018 09:27
Show Gist options
  • Save oskarsh/9c0f3974e87b363e0326cd7d5e4e9841 to your computer and use it in GitHub Desktop.
Save oskarsh/9c0f3974e87b363e0326cd7d5e4e9841 to your computer and use it in GitHub Desktop.
import requests
#specify the api of coinmarketcap
url = https://api.coinmarketcap.com/v1/ticker/?convert=EUR&Limit=10
# for every coin we find on the website
for coin in requests.get(url).json():
print(coin['name], coin['price_usd’])
@oskarsh
Copy link
Author

oskarsh commented Jun 19, 2018

This is the tutorial code for my blog entry on how to write an easy coinmarketcap-price-fetcher with python using the request libary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment