<blockquote>
  <p>Can I add address not owned by me to local account to achieve transactions by getreceivedbyaddress command?</p>
</blockquote>

<p>No, bitcoind only keeps track of transactions related to your wallet, not all transactions. So to do this, you can add a specific address as a watch only address to your wallet if you don't have the private key, and then rescan to find relevant transactions for it, but that will usually take a while.</p>

CC BY-SA 3.0
2017-09-25T10:43:27.727Z
okay, how can I add a watch only address to my wallet?
Vassily
CC BY-SA 3.0
2017-09-25T10:51:10.800Z
You can use the `importaddress` RPC: https://bitcoin.org/en/developer-reference#importaddress
meshcollider
CC BY-SA 3.0
2017-09-25T15:20:31.437Z
Ok, I've used it, but importing works so slowly? Is there really no other ways to achive same speed as it achived at blockchain.info?
Vassily
CC BY-SA 3.0
2017-09-25T22:10:29.170Z
No, blockchain keeps its own database of transactions and everything, it doesn't query bitcoind every time
meshcollider
CC BY-SA 3.0
2017-09-25T10:41:14.373Z
2017-09-25T10:41:14.373Z
meshcollider
<p>I want to get list of all address's income transactions since the genesis block</p>

<pre><code>import requests, json

rpcPort = 8332
rpcUser = '[removed]'
rpcPassword = '[removed]'

#Accessing the RPC local server
serverURL = 'http://' + rpcUser + ':' + rpcPassword + '@localhost:' + str(rpcPort)

headers = {'content-type': 'application/json'}
payload = json.dumps({"method": 'listunspent', "params": [0, 999999, ['1KuWLoZuoJgz3N6sLoAwGth9XGm8YuFTGt']], "jsonrpc": "2.0"})
response = requests.post(serverURL, headers=headers, data=payload)
print(response.text)
</code></pre>

<p>it returns</p>

<pre><code>{"result":[],"error":null,"id":null}
</code></pre>

<p>But according to <a href="https://blockchain.info/address/1KuWLoZuoJgz3N6sLoAwGth9XGm8YuFTGt" rel="nofollow noreferrer">https://blockchain.info/address/1KuWLoZuoJgz3N6sLoAwGth9XGm8YuFTGt</a> there are a lot of transactions. How to get list of address-related transactions without private key? Can I add address not owned by me to local account to achieve transactions by <code>getreceivedbyaddress</code> command?</p>

<json-rpc><api>
How to get all income transactions of an address?
Vassily
# How to get all income transactions of an address?

(Asked by: username_0 on 2017-09-25)

I want to get list of all address's income transactions since the genesis block
import requests, json

rpcPort = 8332
rpcUser = '[removed]'
rpcPassword = '[removed]'

#Accessing the RPC local server
serverURL = 'http://' + rpcUser + ':' + rpcPassword + '@localhost:' + str(rpcPort)

headers = {'content-type': 'application/json'}
payload = json.dumps({"method": 'listunspent', "params": [0, 999999, ['1KuWLoZuoJgz3N6sLoAwGth9XGm8YuFTGt']], "jsonrpc": "2.0"})
response = requests.post(serverURL, headers=headers, data=payload)
print(response.text)

it returns
{"result":[],"error":null,"id":null}

But according to https://blockchain.info/address/1KuWLoZuoJgz3N6sLoAwGth9XGm8YuFTGt there are a lot of transactions. How to get list of address-related transactions without private key? Can I add address not owned by me to local account to achieve transactions by getreceivedbyaddress command?

**Tags:** json-rpc, api


---

## 1 answers

### Answer by username_1 on 2017-09-25. Score: 2

> Can I add address not owned by me to local account to achieve transactions by getreceivedbyaddress command?

No, bitcoind only keeps track of transactions related to your wallet, not all transactions. So to do this, you can add a specific address as a watch only address to your wallet if you don't have the private key, and then rescan to find relevant transactions for it, but that will usually take a while.

> **Comments:**
> **username_0**: okay, how can I add a watch only address to my wallet?  
> **username_1**: You can use the `importaddress` RPC: https://bitcoin.org/en/developer-reference#importaddress  
> **username_0**: Ok, I've used it, but importing works so slowly? Is there really no other ways to achive same speed as it achived at blockchain.info?  
> **username_1**: No, blockchain keeps its own database of transactions and everything, it doesn't query bitcoind every time  

---

