blockchain.info JSON API problem

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.

eu tot eu

Posted 2012-12-30T18:16:16.987

Reputation: 33

Answers

0

Ben Reeves

Posted 2012-12-30T18:16:16.987

Reputation: 2 848

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]+'

cdecker

Posted 2012-12-30T18:16:16.987

Reputation: 7 878