<p>You can use the <code>importaddress</code> RPC to add addresses without associated private key to the wallet. The wallet code will now list transactions involve such addresses, and include them in balance calculations (though you may need to add an extra argument for <em>includeWatchOnly</em> to some RPC calls).</p>

<p>If you import an address that has existing confirmed transactions, you'll need to rescan, which is a lengthy and slow process. If you make sure you're importing before giving out the address anywhere (for example, because they're being generated on an offline treasure machine which you control), it's perfect though.</p>

<p>You'll get notifications in all the normal ways for these addresses, including using <code>-walletnotify</code> (with a shell script executed for each received or confirmed transaction), and ZMQ (if compiled and enabled).</p>

CC BY-SA 3.0
2016-09-28T00:35:30.063Z
2016-09-28T00:35:30.063Z
Pieter Wuille
<p>I found a similar question, but rather outdated in my opinion: <a href="https://bitcoin.stackexchange.com/questions/24554/how-to-get-instant-notification-of-any-bitcoin-transaction-involving-a-specific/24555#24555">How to get instant notification of any Bitcoin transaction involving a specific public address as recipient without knowing the wallet or private key</a></p>

<p>I have a bitcoind running, however don't have any funds managed by it. I want to run a script by any transaction, which is going to one of my (many) addresses. All the addresses are not part of the bitcoind wallet.</p>

<p>The following I want to achieve:</p>

<ul>
<li>Configure bitcoind with a list of my addresses (not part of the wallet), might be around 200</li>
<li>Remove some addresses (if not needed anymore) from watch notifications</li>
<li>Notifiy a script when a transaction to one of my addresses arrives (mempool transaction, no confirmations)</li>
<li>Notifiy when a transaction gets confirmed (first time, maybe also sixth time)</li>
</ul>

<p>My Setup:</p>

<ul>
<li>Newest version of bitcoin core (can be updated)</li>
<li>Scripts in PHP (could be other programming language with bindings to bitcoind)</li>
</ul>

<p>Basically, I want to get the notification to the respective script. All relevant information can be crawled via the RPC API. However polling the bitcoind needs to be eliminated.</p>

<bitcoind><address><bitcoin.conf><watch-only>
Notifications to watch only addresses in bitcoind
Stefan
# Notifications to watch only addresses in bitcoind

(Asked by: username_0 on 2016-09-17)

I found a similar question, but rather outdated in my opinion: [How to get instant notification of any Bitcoin transaction involving a specific public address as recipient without knowing the wallet or private key](https://bitcoin.stackexchange.com/questions/24554/how-to-get-instant-notification-of-any-bitcoin-transaction-involving-a-specific/24555#24555)

I have a bitcoind running, however don't have any funds managed by it. I want to run a script by any transaction, which is going to one of my (many) addresses. All the addresses are not part of the bitcoind wallet.

The following I want to achieve:

* Configure bitcoind with a list of my addresses (not part of the wallet), might be around 200
* Remove some addresses (if not needed anymore) from watch notifications
* Notifiy a script when a transaction to one of my addresses arrives (mempool transaction, no confirmations)
* Notifiy when a transaction gets confirmed (first time, maybe also sixth time)

My Setup:

* Newest version of bitcoin core (can be updated)
* Scripts in PHP (could be other programming language with bindings to bitcoind)

Basically, I want to get the notification to the respective script. All relevant information can be crawled via the RPC API. However polling the bitcoind needs to be eliminated.

**Tags:** bitcoind, address, bitcoin.conf, watch-only


---

## 1 answers

### Answer by username_1 on 2016-09-28. Score: 1 | Accepted answer

You can use the `importaddress` RPC to add addresses without associated private key to the wallet. The wallet code will now list transactions involve such addresses, and include them in balance calculations (though you may need to add an extra argument for *includeWatchOnly* to some RPC calls).

If you import an address that has existing confirmed transactions, you'll need to rescan, which is a lengthy and slow process. If you make sure you're importing before giving out the address anywhere (for example, because they're being generated on an offline treasure machine which you control), it's perfect though.

You'll get notifications in all the normal ways for these addresses, including using `-walletnotify` (with a shell script executed for each received or confirmed transaction), and ZMQ (if compiled and enabled).


---

