<p><code>getreceivedbyaddress</code> only works for <em>your</em> addresses, i.e. those for which the private key is in your wallet.  Those are the only addresses for which <code>bitcoin-qt</code> keeps indexed transaction data.  Getting balance and transaction information for arbitrary addresses is unfortunately not supported by <code>bitcoin-qt</code>; sites like blockchain.info write custom software that manually parses the block chain.</p>

<p>See also <a href="https://bitcoin.stackexchange.com/a/10099/5757">this answer</a>.</p>

CC BY-SA 3.0
2014-03-10T17:14:50.653Z
Thanks, that explains it. Is there a way to (perhaps temporarily) add such addresses to my wallet? Because I don't have the private key, I can only do so in a read-only way (like a 'watch only' wallet or address) but is this supported at all by Bitoin-Qt / bitcoind?
Monty Carlo
CC BY-SA 3.0
2014-03-10T17:16:18.717Z
Now that I think of it, perhaps this could be faked by somehow importing this address in an encrypted wallet, with a dummy private key? Bitcoin-Qt won't ask for my password (and hence, not use this private key at all) until I actually try to spend something...?
Monty Carlo
CC BY-SA 3.0
2014-03-11T13:08:37.870Z
@Monty: I believe that bitcoin-qt does not have support for watch only wallets, though other clients might. Your encrypted wallet suggestion might work, I suppose, but it sounds like a lot of work.
Nate Eldredge
CC BY-SA 3.0
2014-03-10T16:57:37.263Z
2014-03-10T16:57:37.263Z
2017-04-13T12:47:36.707Z
Nate Eldredge
<p>I believe that getreceivedbyaddress only reports on addresses that <em>are in your wallet</em>.  It doesn't allow you to look up arbitrary addresses, like the 1Dorian one.</p>

CC BY-SA 3.0
2014-03-10T16:58:04.423Z
2014-03-10T16:58:04.423Z
ChrisW
<p>I downloaded and installed Bitcoin-Qt 0.8.6, fully synced the block chain (<a href="https://i.sstatic.net/75sq3.png" rel="nofollow noreferrer">according to the software itself</a>) and now trying some basic commands through the console.</p>

<p>For some reason, <code>getreceivedbyaddress &lt;address&gt;</code> always returns zero, even for addresses that I know contain some bitcoins.</p>

<p>For example: <code>getreceivedbyaddress 1Dorian4RoXcnBv9hnQ4Y2C1an6NJ4UrjX</code> gives 0.00000000 (<a href="https://i.sstatic.net/CMoJV.png" rel="nofollow noreferrer">mini-screenshot</a>), yet we can all verify that this address actually <em>did</em> receive bitcoins (see comment).</p>

<p>Restarted the software several times, restarted my PC, and also tried doing this from the command line using bitcoind instead of the Bitcoin-Qt user interface, still the same result.</p>

<p>Am I doing something wrong or misunderstanding Bitcoin-Qt?</p>

CC BY-SA 3.0
2014-03-10T15:52:40.077Z
Can't post more than 2 links, but here's to show that this address indeed has a positive BTC balance: https://blockchain.info/address/1Dorian4RoXcnBv9hnQ4Y2C1an6NJ4UrjX
Monty Carlo
CC BY-SA 3.0
2014-03-10T18:46:28.287Z
The answer is here: http://bitcoin.stackexchange.com/a/19739/1878
makerofthings7
CC BY-SA 3.0
2014-03-11T08:59:02.707Z
try bitcoind listaddressgroupings see if that shows which address the BTC are in.
hafnero
<bitcoind>
Installed latest Bitcoin-Qt, fully synced, but 'getreceivedbyaddress' etc doesn't work?
Monty Carlo
# Installed latest Bitcoin-Qt, fully synced, but 'getreceivedbyaddress' etc doesn't work?

(Asked by: username_0 on 2014-03-10)

I downloaded and installed Bitcoin-Qt 0.8.6, fully synced the block chain ([according to the software itself](https://i.sstatic.net/75sq3.png)) and now trying some basic commands through the console.

For some reason, `getreceivedbyaddress`  always returns zero, even for addresses that I know contain some bitcoins.

For example: `getreceivedbyaddress 1Dorian4RoXcnBv9hnQ4Y2C1an6NJ4UrjX` gives 0.00000000 ([mini-screenshot](https://i.sstatic.net/CMoJV.png)), yet we can all verify that this address actually *did* receive bitcoins (see comment).

Restarted the software several times, restarted my PC, and also tried doing this from the command line using bitcoind instead of the Bitcoin-Qt user interface, still the same result.

Am I doing something wrong or misunderstanding Bitcoin-Qt?

**Tags:** bitcoind

> **Comments:**
> **username_0**: Can't post more than 2 links, but here's to show that this address indeed has a positive BTC balance: https://blockchain.info/address/1Dorian4RoXcnBv9hnQ4Y2C1an6NJ4UrjX  
> **username_1**: The answer is here: http://bitcoin.stackexchange.com/a/19739/1878  
> **username_2**: try bitcoind listaddressgroupings see if that shows which address the BTC are in.  

---

## 2 answers

### Answer by username_3 on 2014-03-10. Score: 2

`getreceivedbyaddress` only works for *your* addresses, i.e. those for which the private key is in your wallet. Those are the only addresses for which `bitcoin-qt` keeps indexed transaction data. Getting balance and transaction information for arbitrary addresses is unfortunately not supported by `bitcoin-qt`; sites like blockchain.info write custom software that manually parses the block chain.

See also [this answer](https://bitcoin.stackexchange.com/a/10099/5757).

> **Comments:**
> **username_0**: Thanks, that explains it. Is there a way to (perhaps temporarily) add such addresses to my wallet? Because I don't have the private key, I can only do so in a read-only way (like a 'watch only' wallet or address) but is this supported at all by Bitoin-Qt / bitcoind?  
> **username_0**: Now that I think of it, perhaps this could be faked by somehow importing this address in an encrypted wallet, with a dummy private key? Bitcoin-Qt won't ask for my password (and hence, not use this private key at all) until I actually try to spend something...?  
> **username_3**: @Monty: I believe that bitcoin-qt does not have support for watch only wallets, though other clients might. Your encrypted wallet suggestion might work, I suppose, but it sounds like a lot of work.  

---

### Answer by username_4 on 2014-03-10. Score: 2

I believe that getreceivedbyaddress only reports on addresses that *are in your wallet*. It doesn't allow you to look up arbitrary addresses, like the 1Dorian one.


---

