3

I'm trying to get the time series for a specific period from Blockchain but the JSON seems to not be there anymore. Does anyone know if the JSON API is not available anymore or it is a temporary issue?

For example when trying to access https://blockchain.info/charts/hash-rate&format=json I get an Unknown Exception.

2 Answers 2

0

This error should be fixed now.

https://blockchain.info/charts/hash-rate?format=json

0
1

The JSON export seems indeed to be broken. A quick workaround is to simply get the graph page and extract the needed data from there:

curl -s https://blockchain.info/charts/hash-rate | grep data: | grep -oE '\[[0-9\.,]+\]'

That should give you the JSON array. The array contains a daily sample of the hash-rate starting from timestamp

curl -s https://blockchain.info/charts/hash-rate | grep pointStart | grep -oE '[0-9]+'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.