0

For instance, can I run a query on a bitcoin node, that returns all addresses with more than 1 bitcoin on them?

0

Bitcoin-core (the full node implementation that makes up the majority of the network) does not keep an index of all addresses and balances, so without writing additional code to do the job, it is not possible. Bitcoin-core keeps track of coins via the UTXO model-- the idea of 'an address with a balance' is just an abstraction of this that makes for a more user-friendly interface.

Of course, you could write some code to create an index of addresses and their respective balances, or perhaps find an already-existing open-source block explorer project that accomplishes this.

| improve this answer | |
  • This would require a lot of performance I assume, right? So nothing to present as "live data". – TrudleR Oct 26 at 7:27
  • @TrudleR its not clear to me what you're asking, do you mean to create a live feed of addresses balances? That is essentially what block explorer services are, you could take a look, for example: github.com/Blockstream/esplora (disclaimer: I'm not affiliated with esplora, and haven't used it myself, but from what I understand of it, it may be of use to you) – chytrik Oct 26 at 9:13
  • Sorry. :) Basically I am just asking if that request would be kind of performance-intensive, which it definitely is. My idea with this question is, to see an overview of all addresses with more than 1 bitcoin on them. But I would probably refresh that not "on-call" but rather use a cache and refresh the real data behind it within a certain time interval. – TrudleR Oct 26 at 9:24
0

You can modify below script to filter the results and see only UTXOs with more than 1 BTC:

https://github.com/in3rsha/bitcoin-utxo-dump

Or you could use API of one of the open source bitcoin explorers to achieve this:

https://github.com/dgarage/NBXplorer

https://github.com/Blockstream/esplora

| improve this answer | |

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.