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 all cryptocurrencies/altcoins? That is going to be a lot of work. There are thousands and the vast majority are effectively scams. Oct 18 '21 at 16:03

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.

  • Awesome! And what about other blockchain? any hints?
    – user127862
    Oct 19 '21 at 9:51
  • As mentioned in the answer, this site only covers Bitcoin, but a few other cryptocurrencies have their own stackexchange sites and you could ask there.
    – Murch
    Oct 19 '21 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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