Created
May 25, 2018 16:05
-
-
Save iannase/5342d4c3daf0408c2d3cf6a8b407afb0 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 json | |
import requests | |
from datetime import datetime | |
listings_url = 'https://api.coinmarketcap.com/v2/listings/' | |
request = requests.get(listings_url) | |
results = request.json() | |
# print(json.dumps(results, sort_keys=True, indent=4)) | |
data = results['data'] | |
print() | |
for currency in data: | |
rank = currency['id'] | |
name = currency['name'] | |
symbol = currency['symbol'] | |
print(str(rank) + ': ' + name + ' (' + symbol + ')') | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment