1

Sorry, I'm probably not going to use the correct terms here.

Does anyone know of, or how to use bitcoind (or of an external library) that can look at or even provide event driven mechanisms to monitor when an address has received equal to or more than a target amount.

I know of the websocket API available from blockchain but I'd ideally do it in house using my own systems if possible.

1

1 Answer 1

2

A rough solution:

If the account is in your wallet, you can use:

bitcoind getreceivedbyaddress "ADDRESS"

to get the amount of bitcoins received by ADDRESS. You can put that line inside an infinite loop. You could create a shell program which stores the result in a variable every 30 seconds (using sleep) and compare it to the previous value. If you subtract the values and find a difference above a threshold you can make the script alert you.

I can be more specific if you tell me your preferences (Python, Linux shell...)

4
  • I'm assuming that won't scale that well for a massive system though?
    – Peter Fox
    Commented May 7, 2013 at 14:47
  • By massive do you mean with many addresses? In that case you might just check each new block for your addresses. You can use getblock and bitcointools github.com/gavinandresen/bitcointools. By the way, the 30 seconds wait time is overkill. If you want confirmed transactions (or transactions that are at least in one block), on average the changes take 10 minutes. Commented May 7, 2013 at 15:31
  • Well ideally I want to create a new address, wait until it has a set amount of bitcoins in that address and then transfer the coins and close the address down, doing this for hundreds if not thousands of addresses at a time
    – Peter Fox
    Commented May 7, 2013 at 15:41
  • I would go for a script calling bitcoind. Or a custom program in Python with bitcointools. I don't think the operations are that complicated. A regular processor should be enough. In any case it seems you will need a bit of work. Commented May 7, 2013 at 16:14

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