16

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
  • 2,695
  • 3
  • 24
  • 45

3 Answers3

21

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
  • 1,669
  • 9
  • 14
  • 1
    I think you are correct. I will let you know and accept this if this is indeed correct. – Karel Bílek Apr 06 '13 at 20:20
  • I did that and there's nothing in my groupings. – Colin Dean Apr 07 '13 at 16:33
  • 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.info – Eyal Apr 07 '13 at 18:17
  • 1
    This also showed me the balance of each address, which was precisely what I needed. – Michael Hampton Aug 11 '15 at 20:28
  • 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 times – tobi Feb 07 '17 at 19:49
  • I wish the GUI app would show these addresses! – Mr. Young Nov 04 '21 at 04:30
  • 1
    This only shows used addresses in your wallet. The proper command is listreceivedbyaddress 0 true which lists all addresses in your wallet regardless of whether or not they have been used. – CR. Feb 26 '22 at 21:29
2

You may be able to use pywallet to get these.

Download a more updated version here.

Colin Dean
  • 7,042
  • 3
  • 30
  • 58
1

The proper command is $ bitcoin-cli listreceivedbyaddress 0 true. It will list all addresses in your wallet, regardless of have being used or not

This answer was originally a comment by CR to Eyal's answer

develCuy
  • 111
  • 3