<p>You could use the <code>-walletnotify</code> startup option for bitcoind/bitcoin-qt. This will execute a program whenever the wallet receives a transaction. So you can write a program which is executed for every transaction and looks for ones which have outputs for the addresses you want. Then this program can do whatever to notify you.</p>

CC BY-SA 4.0
2021-12-19T13:55:06.130Z
I'm glad for your answer. I was hoping I could give an additional argument to `-walletnotify` for inline commands, but it seems [I have to modify the `conf` to contain a call to a script](https://bitcoin.stackexchange.com/questions/24457/how-do-i-use-walletnotify). I.e. `walletnotify=/home/scripts/transaction.sh %s`. Apparently, the flag only activates the feature. Your answer helped me to get on the right track, though! :)
Martin Braun
CC BY-SA 4.0
2021-12-18T01:22:52.763Z
2021-12-18T01:22:52.763Z
Ava Chow
<p>I would like to monitor incoming transactions for a single address using</p>
<pre><code>bitcoin-cli listreceivedbyaddress 1 false false &lt;myaddress&gt;
</code></pre>
<p>My problem is the returned array will become longer and longer and I cannot output the last 10 incoming transactions using the arguments. I don't want to rely on any online service, rather I want to use the CLI.</p>
<p>Can this be done?</p>

<bitcoin-cli>
How to properly monitor incoming transactions for a specific address with bitcoin-cli?
Martin Braun
# How to properly monitor incoming transactions for a specific address with bitcoin-cli?

(Asked by: username_0 on 2021-12-17)

I would like to monitor incoming transactions for a single address using

```
bitcoin-cli listreceivedbyaddress 1 false false <myaddress>

```

My problem is the returned array will become longer and longer and I cannot output the last 10 incoming transactions using the arguments. I don't want to rely on any online service, rather I want to use the CLI.

Can this be done?

**Tags:** bitcoin-cli


---

## 1 answers

### Answer by username_1 on 2021-12-18. Score: 2 | Accepted answer

You could use the `-walletnotify` startup option for bitcoind/bitcoin-qt. This will execute a program whenever the wallet receives a transaction. So you can write a program which is executed for every transaction and looks for ones which have outputs for the addresses you want. Then this program can do whatever to notify you.

> **Comments:**
> **username_0**: I'm glad for your answer. I was hoping I could give an additional argument to `-walletnotify` for inline commands, but it seems [I have to modify the `conf` to contain a call to a script](https://bitcoin.stackexchange.com/questions/24457/how-do-i-use-walletnotify). I.e. `walletnotify=/home/scripts/transaction.sh %s`. Apparently, the flag only activates the feature. Your answer helped me to get on the right track, though! :)  

---

