How can I get circulating supply and total supply for cryptocurrencies?
I am not talking about using coinmarketcap's API, I want to get the data myself. Should I get it from the source-code?
How can I get circulating supply and total supply for cryptocurrencies?
I am not talking about using coinmarketcap's API, I want to get the data myself. Should I get it from the source-code?
For Bitcoin you can get the total supply via gettxoutsetinfo
, which produces the following output:
$ bitcoin-cli gettxoutsetinfo
{
"height": 705603,
"bestblock": "0000000000000000000173b87bcaa99c5020eb16b13a856f7015130889c5ff93",
"transactions": 45865084,
"txouts": 75262497,
"bogosize": 5632719734,
"hash_serialized_2": "ac0ce667248d97678d5eb4fcfb7e2ae667e205775765852e5b595afa73fb2eb0",
"disk_size": 4613582238,
"total_amount": 18847318.79243407
}
In the output, total_amount
refers to the sum of all existing bitcoins. While other cryptocurrencies are not on-topic here, gettxoutsetinfo
should also work for most Bitcoin-derived altcoins.