<p>Actually, it's pretty much possible!</p>

<p>You will have to listen for <code>rawtx</code> topic of ZeroMQ in order to retrieve binary representation of the transaction descriptor.</p>

<p>Then you should parse the transaction body and extract Bitcoin addresses from it's output scripts. You could either do this manually, or use some third-party library. No need to make RPC calls!</p>

<h1>References:</h1>

<ul>
<li><a href="https://en.bitcoin.it/wiki/Transaction" rel="noreferrer">Bitcoin Transaction Format</a></li>
<li><a href="https://en.bitcoin.it/wiki/Script" rel="noreferrer">Bitcoin Script Format</a></li>
</ul>

CC BY-SA 3.0
2016-12-22T18:19:59.310Z
2016-12-22T18:19:59.310Z
Robert Wood
<p>I'm pretty much doing the same thing. I recommend you to use distributed cache services such as Redis for your addresses' storage and query against that database.</p>

CC BY-SA 4.0
2018-11-25T16:47:18.220Z
2018-11-25T16:47:18.220Z
Hamid
<p>I'm developing a system which should monitor incoming transactions for the local addresses (addresses in this node's wallet).</p>

<p>It would be great to use high-performance ZeroMQ for this. Is it possible?</p>

<p>I know I can receive notifications about new transactions from it. But notification only contains transaction ID. How do I know if it's related to one of the local addresses?</p>

<p>Do I need to make RPC call for each transaction to find it's output address? This seems extremely ineffective, cause there a lot of new transactions and by making so many RPC calls I will just flood the server.</p>

<p>Is there a better option?</p>

<bitcoind><zeromq>
Using ZeroMQ of bitcoind to monitor addresses?
Robert Wood
# Using ZeroMQ of bitcoind to monitor addresses?

(Asked by: username_0 on 2016-12-22)

I'm developing a system which should monitor incoming transactions for the local addresses (addresses in this node's wallet).

It would be great to use high-performance ZeroMQ for this. Is it possible?

I know I can receive notifications about new transactions from it. But notification only contains transaction ID. How do I know if it's related to one of the local addresses?

Do I need to make RPC call for each transaction to find it's output address? This seems extremely ineffective, cause there a lot of new transactions and by making so many RPC calls I will just flood the server.

Is there a better option?

**Tags:** bitcoind, zeromq


---

## 2 answers

### Answer by username_0 on 2016-12-22. Score: 5

Actually, it's pretty much possible!

You will have to listen for `rawtx` topic of ZeroMQ in order to retrieve binary representation of the transaction descriptor.

Then you should parse the transaction body and extract Bitcoin addresses from it's output scripts. You could either do this manually, or use some third-party library. No need to make RPC calls!

# References:

* [Bitcoin Transaction Format](https://en.bitcoin.it/wiki/Transaction)
* [Bitcoin Script Format](https://en.bitcoin.it/wiki/Script)


---

### Answer by username_1 on 2018-11-25. Score: 2

I'm pretty much doing the same thing. I recommend you to use distributed cache services such as Redis for your addresses' storage and query against that database.


---

