I'd like to implement a very simple address monitoring feature on a site I'm working on. I'd like to just be able to say "Listen to this address on the testnet for money to come in", and update the HTML on the page when BTC comes in. I realize Blockchain.info provides a websocket for precisely this, but doesn't provide it for use on testnet3.

I'm sure I'm overlooking something obvious. Any help is greatly appreciated.

  • Added info about SoChain - you might want to check it out. Sep 10, 2014 at 10:25

1 Answer 1


Usually you do this on the wallet service you are using. They provide server-to-server notification callbacks when the address receives transactions. Then you parse this transaction and let your on server to notify JavaScript clients.

EDIT: SoChain offers no-authentication, WebSockets, API to monitor Bitcoin addresses in real-time. You can use this on cliet-side JavaScript directly:


I don't know if any pure client-side JavaScript APIs exist with notification feature - you always need to set up webhooks to some server, or be directly connected to bitcoind.

Also there is the issue of confirmation level - when you consider the transaction to be received, how many confirmations you demand for it. You'll usually end up getting several notifications per each new confirmation.

I have done this in my open source project Liberty Music Store using blockchain.info.

For inspiration, see the relevant blockchain.info webhook code which then forwards this information to JavaScript through Redis pub-sub listener pattern (though in this case it does using HTTP long poll instead of WebSockets for Android 2.3 compatibility):





Your Answer

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

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