1

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 :)

1

1 Answer 1

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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.