Question

I am trying to query the bitcoin daemon in order to find out what's the total amount of bitcoins mined/produced so far in order to calculate the market capitalization. However, I can't seem to find any command that does that.

I've checked the following link to no avail:

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

Was it helpful?

Solution

You can find that information from the number of blocks. 50 BTC per block were created for the first 210 000 blocks, then 25 BTC per block for the next 210 000 blocks, etc.

If I take, say:

http://bitcoincharts.com/

as I write this SO answer I can read:

Blocks      279383
Total BTC   12.235M

Starting from 279 383 blocks you can find:

 210 000            * 50 = 10 500 000
(279 383 - 210 000) * 25 =  1 734 575

10 5000 + 1 734 575      = 12 234 575

12 234 575 which that site rounded up as "12.235M"

This is not 100% correct as the first 50 bitcoins were not usable etc. moreover it's a fact that quite a lot of the early bitcoins mined are lost forever.

But that approximation should be "close enough" and seems to be what most sites are using.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top