<p>You can't do that. The client only keeps indexes of the balances of addresses you own. There is no ability to query the balance of arbitrary addresses. </p>

CC BY-SA 3.0
2014-08-15T05:21:02.317Z
This is correct but completely irrelevant for the question.
Pieter Wuille
CC BY-SA 3.0
2014-02-15T19:16:32.547Z
2014-02-15T19:16:32.547Z
user13413
<p>calling <code>getaccountaddress</code> method on an address associated with the default account return "" the name of the default account. The problem is calling <code>getaccountaddress</code> on foreign address that doesn't exist in the local wallet will return "" !</p>

<p>Shouldn't this method in the last case return an error or something ? </p>

<p>i think the solution here is to call <code>validateaddress</code> method to check this address <code>ismine</code> or not.</p>

CC BY-SA 3.0
2014-09-14T01:39:23.453Z
Perhaps you should file a bug report.
Nate Eldredge
<json-rpc>
calling getaccount rpc method on foreign address
Farghaly
# calling getaccount rpc method on foreign address

(Asked by: username_0 on 2014-02-15)

calling `getaccountaddress` method on an address associated with the default account return "" the name of the default account. The problem is calling `getaccountaddress` on foreign address that doesn't exist in the local wallet will return "" !

Shouldn't this method in the last case return an error or something ?

i think the solution here is to call `validateaddress` method to check this address `ismine` or not.

**Tags:** json-rpc

> **Comments:**
> **username_1**: Perhaps you should file a bug report.  

---

## 1 answers

### Answer by username_2 on 2014-02-15. Score: 1

You can't do that. The client only keeps indexes of the balances of addresses you own. There is no ability to query the balance of arbitrary addresses.

> **Comments:**
> **username_3**: This is correct but completely irrelevant for the question.  

---

