I want to create a listener for BTC deposits in a multitude of addresses that I'd control, and which would run continuously. After doing some research, I found out that the best way would be through ZeroMQ's messaging library.

But I just tried a basic setInterval() with a getBalance() call to a node's endpoint with an interval of 15 seconds between call, and it gets me the most updated balance without any issues, and when I make a deposit to the called address while running the function, setInterval gives me the updated balance, so it's a listener all the way.

The question would be then: Can I use the setInterval approach for my listener or do I need to use ZeroMQ for a more professional and industrial purpose and that's the reason why I came across with that option?

Thanks for the help beforehand.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.