<p>I have since found out that you can only use the bitcoin core to find addresses that are generated in the bitcoin core wallet.  You can add external addresses to the wallet, but then you need to re-index.  Code changes are in the works to add addrindex=1 to the config, which will index your local chain for all addresses.  Alternatively, you can use a block explorer website API service, or run Insight on your own chain.  So, no easy answer.  Probably best to use website APIs initially, and updated bitcoin core in the medium term.</p>

CC BY-SA 3.0
2017-04-13T15:12:31.173Z
2017-04-13T15:12:31.173Z
Steve Hibbert
<p>I am working in C# with NBitcoin.  I have created an extended master private key, and I can create the hierarchy of derived keys.  In TestNet, I have requested some coin from a faucet, and the transaction has gone to the test address (checked in testnet.blockexplorer.com).</p>

<p>I have a local testnet chain running (and a mainnet chain, but testnet for now is all that matters) and I am trying to interact with it via the bitcoind RPC, as per the Bitcoin developer examples.</p>

<p>How do I work out the balance (value held) on my private key, that pairs to the public key, that generated the receiving address?  Am I right in thinking that the RPC bitcoind client will not show this, as it maintains it's own keys?  If so, how can I query the blockchain for transactions on this address?  There is an RPC to import an address, but that seems like a kludge.  I should be able to do what the bitcoin core does for it's own local addresses, but for my locally generated addresses.</p>

<p>Thanks in advance for any guidance.</p>

<utxo><balance><bip32-hd-wallets>
How to work out the balance for an HD Wallet extended private key?
Steve Hibbert
# How to work out the balance for an HD Wallet extended private key?

(Asked by: username_0 on 2017-04-06)

I am working in C# with NBitcoin. I have created an extended master private key, and I can create the hierarchy of derived keys. In TestNet, I have requested some coin from a faucet, and the transaction has gone to the test address (checked in testnet.blockexplorer.com).

I have a local testnet chain running (and a mainnet chain, but testnet for now is all that matters) and I am trying to interact with it via the bitcoind RPC, as per the Bitcoin developer examples.

How do I work out the balance (value held) on my private key, that pairs to the public key, that generated the receiving address? Am I right in thinking that the RPC bitcoind client will not show this, as it maintains it's own keys? If so, how can I query the blockchain for transactions on this address? There is an RPC to import an address, but that seems like a kludge. I should be able to do what the bitcoin core does for it's own local addresses, but for my locally generated addresses.

Thanks in advance for any guidance.

**Tags:** utxo, balance, bip32-hd-wallets


---

## 1 answers

### Answer by username_0 on 2017-04-13. Score: 1

I have since found out that you can only use the bitcoin core to find addresses that are generated in the bitcoin core wallet. You can add external addresses to the wallet, but then you need to re-index. Code changes are in the works to add addrindex=1 to the config, which will index your local chain for all addresses. Alternatively, you can use a block explorer website API service, or run Insight on your own chain. So, no easy answer. Probably best to use website APIs initially, and updated bitcoin core in the medium term.


---

