Skip to content

Instantly share code, notes, and snippets.

@nrese
Created June 4, 2020 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nrese/9c372bd6239c44cae5c60d0a15095a2d to your computer and use it in GitHub Desktop.
Save nrese/9c372bd6239c44cae5c60d0a15095a2d to your computer and use it in GitHub Desktop.
from six.moves import urllib
url = "https://data.messari.io/api/v1/assets/btc/metrics"
print(urllib.request.urlopen(url).read())
{
"status": {
"timestamp": "2018-06-02T22:51:28.209Z",
"elapsed": 10
},
"data": {
"id": "1e31218a-e44e-4285-820c-8282ee222035",
"symbol": "BTC",
"name": "Bitcoin",
"slug": "bitcoin",
"market_data": {
"price_usd": 7184.79746667989,
"price_btc": 1,
"volume_last_24_hours": 3686422132.4061913,
"real_volume_last_24_hours": 213007404.88224277,
"volume_last_24_hours_overstatement_multiple": 17.23897417186806,
"percent_change_usd_last_24_hours": 0.7429609262723845,
"percent_change_btc_last_24_hours": 0,
"ohlcv_last_1_hour": {
"open": 7197.467535968304,
"high": 7208.544343587009,
"low": 7179.140622464517,
"close": 7184.797466679892,
"volume": 9690910.565409226
},
"ohlcv_last_24_hour": {
"open": 7197.467535968304,
"high": 7208.544343587009,
"low": 7179.140622464517,
"close": 7184.797466679892,
"volume": 9690910.565409226
}
},
"supply": {
"maximum": null,
"y_2050": 20983495.3984375,
"issued_and_outstanding": null,
"circulating": 17394725,
"fully_liquid": null
},
"blockchain_stats_24_hours": {
"transaction_volume": 2926664361.96,
"nvt": 14.714094934462347,
"sum_of_fees": 137652.65544754025,
"median_tx_value": 210.933481976,
"median_tx_fee": 0.09425302706400435,
"count_of_active_addresses": 639963,
"count_of_tx": 275136,
"count_of_payments": 388150,
"new_issuance": 5815496.258292316,
"average_difficulty": 6727225469720,
"kilobytes_added": 126196.179,
"count_of_blocks_added": 139,
"supply_moved_off_chain": null
},
"all_time_high": {
"price": 20089,
"days_since": 344,
"percent_down": 81.47285775644839
},
"developer_activity": {
"stars": 34996,
"watchers": 3513,
"commits_last_3_months": 342,
"commits_last_1_year": 1775,
"lines_added_last_3_months": 14742,
"lines_added_last_1_year": 117176,
"lines_deleted_last_3_months": 11106,
"lines_deleted_last_1_year": 73395
},
"roi_data": {
"percent_change_last_1_week": -0.28963853172695914,
"percent_change_last_1_month": -0.41911389139537464,
"percent_change_last_3_months": -0.4671650746253208,
"percent_change_last_1_year": -0.5908177605434218
},
"misc_data": {
"asset_age_days": 3613,
"vladimir_club_cost": 7862341.302686478,
"categories": [
[
"Currency"
]
],
"sector": [
[
"Currency"
]
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment