<p>It doesn't show up in the results from getaddressesbyaccount() because addresses are only associated with accounts by use of getnewaddress() or setaccount().</p>

CC BY-SA 3.0
2013-11-29T19:16:32.117Z
Why did they use this approach? It doesn't make sense to me. Also is there any other way to show all Bitcoin addresses?
Jori
CC BY-SA 3.0
2013-11-29T16:41:47.160Z
2013-11-29T16:41:47.160Z
Bitlab.co
<p>I have a tiny question regarding the Bitcoin JSON-RPC API. I have <a href="http://blockexplorer.com/testnet/t/6yd81zFUCV" rel="nofollow">a transaction on Testnet</a> which sends one coin to an other address owned by me (on an other account than the sender). The sending address, <code>mtGaEd9zZU8B7aYSuQiDFZTo2wiS8dWb3c</code>, is listed under the default account, running <code>getaccount mtGaEd9zZU8B7aYSuQiDFZTo2wiS8dWb3c</code> outputs indeed an empty string. The receiving address, <code>mzcj8xYome3gmAWZG57yutv14sctPxbPV6</code>, is listed under an account named <code>test</code>, as expected running <code>getaccount mzcj8xYome3gmAWZG57yutv14sctPxbPV6</code> returns <code>test</code>. Both addresses also show up when I use <code>getaddressesbyaccount</code>, but the change that went to address <code>mnUJRd9CL3GV1QbWFxJxLj2DgE1ADSB8oR</code>, which also returns an emtpy string when using it as argument to <code>getaccount</code>, doesn't show up in the <code>getaddressesbyaccount</code> call output. Why is that? I can't sum the balances of each addresses now for a reliable account balance, only <code>getbalance</code> return the right answer.</p>

<bitcoind><json-rpc>
Account change address is not showing up with `getaddressesbyaccount`
Jori
# Account change address is not showing up with `getaddressesbyaccount`

(Asked by: username_0 on 2013-11-29)

I have a tiny question regarding the Bitcoin JSON-RPC API. I have [a transaction on Testnet](http://blockexplorer.com/testnet/t/6yd81zFUCV) which sends one coin to an other address owned by me (on an other account than the sender). The sending address, `mtGaEd9zZU8B7aYSuQiDFZTo2wiS8dWb3c`, is listed under the default account, running `getaccount mtGaEd9zZU8B7aYSuQiDFZTo2wiS8dWb3c` outputs indeed an empty string. The receiving address, `mzcj8xYome3gmAWZG57yutv14sctPxbPV6`, is listed under an account named `test`, as expected running `getaccount mzcj8xYome3gmAWZG57yutv14sctPxbPV6` returns `test`. Both addresses also show up when I use `getaddressesbyaccount`, but the change that went to address `mnUJRd9CL3GV1QbWFxJxLj2DgE1ADSB8oR`, which also returns an emtpy string when using it as argument to `getaccount`, doesn't show up in the `getaddressesbyaccount` call output. Why is that? I can't sum the balances of each addresses now for a reliable account balance, only `getbalance` return the right answer.

**Tags:** bitcoind, json-rpc


---

## 1 answers

### Answer by username_1 on 2013-11-29. Score: 0

It doesn't show up in the results from getaddressesbyaccount() because addresses are only associated with accounts by use of getnewaddress() or setaccount().

> **Comments:**
> **username_0**: Why did they use this approach? It doesn't make sense to me. Also is there any other way to show all Bitcoin addresses?  

---

