Created
June 19, 2018 09:27
-
-
Save oskarsh/9c0f3974e87b363e0326cd7d5e4e9841 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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’]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the tutorial code for my blog entry on how to write an easy coinmarketcap-price-fetcher with python using the request libary.