<p>We use a third party service for this - i’d recommend <a href="https://blockchainwebhooks.com" rel="nofollow noreferrer">https://blockchainwebhooks.com</a> - You can set a webhook for each address, and when a new transaction enters a block with this address as an input or output the webhooks will trigger and send you the transaction details. Hope this helps!</p>

CC BY-SA 4.0
2018-08-09T17:46:11.280Z
2018-08-09T17:46:11.280Z
sizzlecookie
<p>I have a situation where I create one address per user through <em>GetNewAddress(User.Id)</em></p>

<p>So, in the end, I have a lot of addresses to monitor, to see if any user has deposited money.</p>

<p>I can do something like this:</p>

<pre><code>foreach (var User in Users)
{
  var T = GetReceivedByAccount(User.Id);
  .. do something if money arrived
}

Wait 30 seconds and repeat...
</code></pre>

<p>But I'm guessing it's not the most efficient.</p>

<p>Is there a better way to do this?</p>

<p>Or can I get all transactions within a specific range in the wallet and then parse them by account?</p>

<p>Sorry if the question seems basic, I'm extremely new to this.. got some code running for the first time something like 16 hours ago :)</p>

CC BY-SA 4.0
2021-08-06T09:59:20.353Z
Does this answer your question? [Get notified of incoming Bitcoin transaction, as soon as it broadcasted](https://bitcoin.stackexchange.com/questions/21500/get-notified-of-incoming-bitcoin-transaction-as-soon-as-it-broadcasted) one answer says *"If using the wallet notify option in bitcoin.conf, you can get a notification any time a transaction occurs on the network that matches a bitcoin address in the wallet. To use this, of course, you'll have to keep Bitcoin-QT or bitcoind running at all times."* See also [How do I use walletnotify](https://bitcoin.stackexchange.com/q/24457/13866)
RedGrittyBrick
<bitcoind>
Monitor a bunch of addresses for deposits
Thomas
# Monitor a bunch of addresses for deposits

(Asked by: username_0 on 2017-11-01)

I have a situation where I create one address per user through *GetNewAddress(User.Id)*

So, in the end, I have a lot of addresses to monitor, to see if any user has deposited money.

I can do something like this:

```
foreach (var User in Users)
{
  var T = GetReceivedByAccount(User.Id);
  .. do something if money arrived
}

Wait 30 seconds and repeat...

```

But I'm guessing it's not the most efficient.

Is there a better way to do this?

Or can I get all transactions within a specific range in the wallet and then parse them by account?

Sorry if the question seems basic, I'm extremely new to this.. got some code running for the first time something like 16 hours ago :)

**Tags:** bitcoind

> **Comments:**
> **username_1**: Does this answer your question? [Get notified of incoming Bitcoin transaction, as soon as it broadcasted](https://bitcoin.stackexchange.com/questions/21500/get-notified-of-incoming-bitcoin-transaction-as-soon-as-it-broadcasted) one answer says *"If using the wallet notify option in bitcoin.conf, you can get a notification any time a transaction occurs on the network that matches a bitcoin address in the wallet. To use this, of course, you'll have to keep Bitcoin-QT or bitcoind running at all times."* See also [How do I use walletnotify](https://bitcoin.stackexchange.com/q/24457/13866)  

---

## 1 answers

### Answer by username_2 on 2018-08-09. Score: 0

We use a third party service for this - i’d recommend <https://blockchainwebhooks.com> - You can set a webhook for each address, and when a new transaction enters a block with this address as an input or output the webhooks will trigger and send you the transaction details. Hope this helps!


---

