<p>Bitcoin Core does not have an address index. It is not trying to be a backend for a block explorer, so looking up this sort of statistic from Bitcoin Core directly will be difficult.</p>
<p>Given that you seem to be interested in current balances, the UTXO set is a good starting point (as RedGrittyBrick already suggested). Bitcoin Core has a hidden RPC called <code>dumptxoutset</code> which will write the complete UTXO set to a <code>.dat</code> file. There appears to be a <a href="https://github.com/theStack/utxo_dump_tools" rel="nofollow noreferrer">tool to convert that dump into an SQLite database</a> by theStack which could help you work with that data dump (I have not tested this myself).</p>
<p>Given that database it should be easy to generate the statistics you want.</p>
<p>If you are just interested in getting the exact count rather than the path of extracting it yourself, it would be much easier to use Blockchair with an appropriate query: using their <a href="https://blockchair.com/bitcoin/addresses?q=balance(100000000..)#" rel="nofollow noreferrer">address endpoint filtered by balances of at least 1 ₿</a>, the result table has <strong>978 715 entries</strong>.</p>
<p><a href="https://i.sstatic.net/uyJ76.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/uyJ76.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2023-01-19T09:48:21.490Z
Thanks Murch, that looks really promising.
Peder Rustad
CC BY-SA 4.0
2023-01-18T15:41:41.203Z
2023-01-18T15:50:43.243Z
2023-01-18T15:50:43.243Z
Murch
<blockquote>
<p>I want to query the bitcoin network to find out how many addresses hold more than 1 bitcoin</p>
</blockquote>
<p>Bitcoin core is mainly focussed around being a wallet for one person. Your objective is not one that Bitcoin core supports very well (if at all)</p>
<p>Of course, Bitcoin core does accumulate a complete set of transaction data and some useful derived data that you can analyse by other means. One of the derived sets of data maintained by Bitcoin core is the chainstate - which I believe is mostly the UTXO set.</p>
<p>I would aim to extract the UTXO set then iterate through that to sum by address (e.g. in a map of addresses to total amount).</p>
<hr />
<p>Related</p>
<ul>
<li><a href="https://bitcoin.stackexchange.com/q/93860/13866">How to query all utxos of an address from a full node?</a></li>
<li><a href="https://bitcoin.stackexchange.com/q/83536/13866">How to find all UTXOs?</a></li>
</ul>

CC BY-SA 4.0
2023-01-17T12:55:10.793Z
Thank you for the answer. What you're saying makes a lot of sense. I think I'll go that route.
Peder Rustad
CC BY-SA 4.0
2023-01-18T15:32:27.117Z
I'd say Bitcoin Core mainly focuses on being a full node, and its wallet is a tool to showcase new protocol advances and some good wallet practices. While it is usable as a wallet for power users, there are most definitely better wallets out there. :)
Murch
CC BY-SA 4.0
2023-01-21T19:38:18.800Z
Can I ask you what wallets are recommended for on-chain analysis?
Peder Rustad
CC BY-SA 4.0
2023-01-16T16:24:25.653Z
2023-01-16T16:29:54.913Z
2023-01-16T16:29:54.913Z
RedGrittyBrick
<p>I'm currently running a Bitcoin Core full node on my raspberry pi. I have set the config file to txindex=1 and I want to query the bitcoin network to find out how many addresses hold more than 1 bitcoin. I have gotten the getrawtransaction and decoderawtransaction to work. Does anyone know where to start? I'm struggling a bit.</p>

<bitcoin-core><bitcoind><address><balance><statistics>
Bitcoin Core Node On Chain Data Addresses Over one Bitcoin
Peder Rustad
# Bitcoin Core Node On Chain Data Addresses Over one Bitcoin

(Asked by: username_0 on 2023-01-15)

I'm currently running a Bitcoin Core full node on my raspberry pi. I have set the config file to txindex=1 and I want to query the bitcoin network to find out how many addresses hold more than 1 bitcoin. I have gotten the getrawtransaction and decoderawtransaction to work. Does anyone know where to start? I'm struggling a bit.

**Tags:** bitcoin-core, bitcoind, address, balance, statistics


---

## 2 answers

### Answer by username_1 on 2023-01-18. Score: 0 | Accepted answer

Bitcoin Core does not have an address index. It is not trying to be a backend for a block explorer, so looking up this sort of statistic from Bitcoin Core directly will be difficult.

Given that you seem to be interested in current balances, the UTXO set is a good starting point (as username_2 already suggested). Bitcoin Core has a hidden RPC called `dumptxoutset` which will write the complete UTXO set to a `.dat` file. There appears to be a [tool to convert that dump into an SQLite database](https://github.com/theStack/utxo_dump_tools) by theStack which could help you work with that data dump (I have not tested this myself).

Given that database it should be easy to generate the statistics you want.

If you are just interested in getting the exact count rather than the path of extracting it yourself, it would be much easier to use Blockchair with an appropriate query: using their [address endpoint filtered by balances of at least 1 ₿](https://blockchair.com/bitcoin/addresses?q=balance(100000000..)#), the result table has **978 715 entries**.

[![enter image description here](https://i.sstatic.net/uyJ76.png)](https://i.sstatic.net/uyJ76.png)

> **Comments:**
> **username_0**: Thanks username_1, that looks really promising.  

---

### Answer by username_2 on 2023-01-16. Score: 1

> I want to query the bitcoin network to find out how many addresses hold more than 1 bitcoin

Bitcoin core is mainly focussed around being a wallet for one person. Your objective is not one that Bitcoin core supports very well (if at all)

Of course, Bitcoin core does accumulate a complete set of transaction data and some useful derived data that you can analyse by other means. One of the derived sets of data maintained by Bitcoin core is the chainstate - which I believe is mostly the UTXO set.

I would aim to extract the UTXO set then iterate through that to sum by address (e.g. in a map of addresses to total amount).

---

Related

* [How to query all utxos of an address from a full node?](https://bitcoin.stackexchange.com/q/93860/13866)
* [How to find all UTXOs?](https://bitcoin.stackexchange.com/q/83536/13866)

> **Comments:**
> **username_0**: Thank you for the answer. What you're saying makes a lot of sense. I think I'll go that route.  
> **username_1**: I'd say Bitcoin Core mainly focuses on being a full node, and its wallet is a tool to showcase new protocol advances and some good wallet practices. While it is usable as a wallet for power users, there are most definitely better wallets out there. :)  
> **username_0**: Can I ask you what wallets are recommended for on-chain analysis?  

---

