Created
June 5, 2020 00:07
-
-
Save nrese/2a541df6ac8d5bd609ac2195bf9e4aee 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 urllib.request | |
url = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=bitcoin" | |
print(urllib.request.urlopen(url).read()) |
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
b'[{"id":"bitcoin","symbol":"btc","name":"Bitcoin","image":"https://assets.coingecko.com/coins/images/1/large/bitcoin.png?1547033579","current_price":9776.55,"market_cap":180127696282,"market_cap_rank":1,"total_volume":25178403205,"high_24h":9844.16,"low_24h":9512.73,"price_change_24h":122.44,"price_change_percentage_24h":1.26828,"market_cap_change_24h":2711215809,"market_cap_change_percentage_24h":1.52816,"circulating_supply":18394331.0,"total_supply":21000000.0,"ath":19665.39,"ath_change_percentage":-50.28552,"ath_date":"2017-12-16T00:00:00.000Z","atl":67.81,"atl_change_percentage":14317.7742,"atl_date":"2013-07-06T00:00:00.000Z","roi":null,"last_updated":"2020-06-05T00:00:37.137Z"}]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment