<p>It seems that <a href="http://blockchain.info" rel="nofollow">Blockchain.info</a>, among others, is compliant to the bitcoin <a href="https://blockchain.info/api/json_rpc_api" rel="nofollow">JSON RPC API</a>. That given, you can use the most common programming languages to access your wallet, last but not least the simple <code>bitcoin-cli</code> command, from the original bitcoin distribution:</p>

<pre><code>$ bitcoin-cli -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo
</code></pre>

<p><code>-rpcconnect=rpc.blockchain.info</code> will instruct <code>bitcoin-cli</code> to connect to blockchain.info's RPC interface; <code>-rpcport=443</code> specifies the remote port; <code>-rpcssl</code> needs to require a SSL connection; <code>-rpcuser</code> and <code>-rpcpassword</code> speak for themselves.</p>

<p>The last word, <code>getinfo</code>, is the command itself.</p>

<p>In your case, it should be something like:</p>

<pre><code>importaddress &lt;bitcoinaddress&gt; "" false
</code></pre>

<p>where <code>importaddress</code> is the command (or method) which instructs the wallet to include the <code>&lt;bitcoinaddress&gt;</code> in the wallet itself. Since you don't specify the private key of the address, but just the address itself, it will become a "watch address" inside your wallet: you will be able to track its status but not to broadcast transactions which involves it. The couple of double quotes <code>""</code> can be replaced with the wallet's name, if you set one. <code>false</code> is a boolean value which instructs the bitcoin engine not to rescan the whole blockchain looking for transactions which involves the address you are adding. I am not a blockchain.info customer, so I don't know the effects of this particular flag. I believe that it is ok to set it true, since blockchain.info scans the blockchain in real time.</p>

CC BY-SA 3.0
2016-09-13T15:33:33.913Z
2016-09-13T15:33:33.913Z
shub
<p>I want to set up a service to monitor the activity of various watch-only addresses. I know Blockchain.info offers an option to do URL callback notifications when a payment is made to an address in their wallet and I know you can add a watch-only address to their wallet by hand, but I can't seem to find an API call to be able to accomplish that. Is it possible to add watch-only addresses to Blockchain.info through an API call?</p>

<address><api><blockchain.info><watch-only>
Adding watch-only addresses to Blockchain.info through an API?
ThePiachu
# Adding watch-only addresses to Blockchain.info through an API?

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

I want to set up a service to monitor the activity of various watch-only addresses. I know Blockchain.info offers an option to do URL callback notifications when a payment is made to an address in their wallet and I know you can add a watch-only address to their wallet by hand, but I can't seem to find an API call to be able to accomplish that. Is it possible to add watch-only addresses to Blockchain.info through an API call?

**Tags:** address, api, blockchain.info, watch-only


---

## 1 answers

### Answer by username_1 on 2016-09-13. Score: 1

It seems that [Blockchain.info](http://blockchain.info), among others, is compliant to the bitcoin [JSON RPC API](https://blockchain.info/api/json_rpc_api). That given, you can use the most common programming languages to access your wallet, last but not least the simple `bitcoin-cli` command, from the original bitcoin distribution:

```
$ bitcoin-cli -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo

```

`-rpcconnect=rpc.blockchain.info` will instruct `bitcoin-cli` to connect to blockchain.info's RPC interface; `-rpcport=443` specifies the remote port; `-rpcssl` needs to require a SSL connection; `-rpcuser` and `-rpcpassword` speak for themselves.

The last word, `getinfo`, is the command itself.

In your case, it should be something like:

```
importaddress <bitcoinaddress> "" false

```

where `importaddress` is the command (or method) which instructs the wallet to include the `<bitcoinaddress>` in the wallet itself. Since you don't specify the private key of the address, but just the address itself, it will become a "watch address" inside your wallet: you will be able to track its status but not to broadcast transactions which involves it. The couple of double quotes `""` can be replaced with the wallet's name, if you set one. `false` is a boolean value which instructs the bitcoin engine not to rescan the whole blockchain looking for transactions which involves the address you are adding. I am not a blockchain.info customer, so I don't know the effects of this particular flag. I believe that it is ok to set it true, since blockchain.info scans the blockchain in real time.


---

