How to get all addresses - including the "change" addresses - from bitcoind?

13

2

I want to get all my addresses - including the auto-generated "change" addresses - from a running bitcoind somehow.

I haven't been able to do it in a simple way. "getaddressesbyaccount" and all the other API options are only listing the "public" addresses and sometimes few additional ones, but never the already used change addresses. Can I do that somehow?

Karel Bílek

Posted 2013-04-03T21:18:43.187

Reputation: 2 197

Answers

13

listaddressgroupings

I used the command listaddressgroupings from the bitcoin-qt console window and it listed all my addresses. I then looked for one of my old send transactions here:

https://blockchain.info/

And found the change address. It matches one of the addresses in the list.

Eyal

Posted 2013-04-03T21:18:43.187

Reputation: 1 539

1I think you are correct. I will let you know and accept this if this is indeed correct.Karel Bílek 2013-04-06T20:20:14.290

I did that and there's nothing in my groupings.Colin Dean 2013-04-07T16:33:44.507

When I use that command, I see every address that I've ever used. Are you sure that the wallet is loaded? It shows other tranactions and non-change addresses? You can find your change addresses by looking up your addresses on blockchain.infoEyal 2013-04-07T18:17:56.963

1This also showed me the balance of each address, which was precisely what I needed.Michael Hampton 2015-08-11T20:28:45.193

is this only working when the address was linked to an account? edit: or do i have to complete syncing the chain? atm listaddressgroupings returns an emty array even though I called getnewaddress several timestobi 2017-02-07T19:49:31.733

1

You may be able to use pywallet to get these.

Download a more updated version here.

Colin Dean

Posted 2013-04-03T21:18:43.187

Reputation: 6 559