5

I would like to be notified of changes to any of my many wallet address as soon as they happen and then programmatically take action. I have been using wallet notify but this has been giving me really inconsistent behavior and I have found that I cannot rely on it.

I'm in search of another solution, and was thinking that I could monitor the blockchain for any changes to addresses I own. Is there some known way to do this?

Other suggestions on how to solve this problem are also appreciated.

3
  • You can always poll bitcoind for new, unconfirmed transactions only with at least one output pointing to one of the addresses you want to get notified for. listunspent will do the trick for you.
    – user11221
    Commented Apr 23, 2014 at 13:46
  • Since this is exactly what wallet notify is supposed to do, afaik, instead of reinventing the wheel, it might be better to investigate why it isn't working for you. The cause might be something in your local environment that would also affect any other solution you might create. Commented Jun 25, 2014 at 8:49
  • That's what I ended up doing, turned out to be a problem with the queuing library I was using.
    – Loourr
    Commented Jun 25, 2014 at 15:39

3 Answers 3

2

You could also use our own Websockets API. More specifically, you need to check the addresses event in order to subscribe to one or multiple address and receive balance updates for them.

An example request command would be:

{
    "event": "addresses:update",
    "filters": {
        "addresses": ["1Biteasym3p5E4soZq8So6NjkjYugEnz2X"]
    }
}

And when the balance is updated you will receive the following response:

{
    "event": "addresses:update",
    "data": {
        "balance": 1746000,
        "total_sent": 0,
        "total_received": 1746000,
        "address": "1Biteasym3p5E4soZq8So6NjkjYugEnz2X"
    }
}
0
0

I'm working on this problem in my open source project https://github.com/richardkiss/pycoinnet. It ain't quite there yet, but I have a prototype working in the lab.

0

https://blockchain.info/api/api_websocket

With the blockchain.info websocket API you can subscribe to any transactions on addresses. That seems like a great place to start :)

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.