0

I'm looking for an api that will give me both historical information and realtime information about how many blocks were mined in a given time frame. I'm also looking for data regarding the total current amount of Ethereum. I need this information in the form of a consumable api (REST api). I've made several searches for data regarding this and I haven't found anything other than historical data in the form of an csv.

David Kamer
  • 103
  • 3

1 Answers1

0

You don't really need an API or anything special. Current block reward is 3 eth per block, take however many blocks were mined in your time frime, multiply by 3 (providing the block reward is still 3 eth per block) and you'll have the amount of ethereum that was mined during that time frame. However this doesn't take into account uncle rewards, etc...

Etherscan provides an API endpoint for just this, however it is still in the beta stages https://etherscan.io/apis#blocks

Here is an example (https://api.etherscan.io/api?module=block&action=getblockreward&blockno=2165403&apikey=YourApiKeyToken)

{"status":"1","message":"OK","result":{"blockNumber":"2165403","timeStamp":"1472533979","blockMiner":"0x13a06d3dfe21e0db5c016c03ea7d2509f7f8d1e3","blockReward":"5314181600000000000","uncles":[{"miner":"0xbcdfc35b86bedf72f0cda046a3c16829a2ef41d1","unclePosition":"0","blockreward":"3750000000000000000"},{"miner":"0x0d0c9855c722ff0c78f21e43aa275a5b8ea60dce","unclePosition":"1","blockreward":"3750000000000000000"}],"uncleInclusionReward":"312500000000000000"}}
hextet
  • 1,583
  • 7
  • 28