Author

Topic: Bitcoind transaction notification (Read 3473 times)

legendary
Activity: 2506
Merit: 1010
May 28, 2013, 09:26:18 AM
#5
Actually, there are two command line switches -blocknotify and -walletnotify which will call a command when a block is found and when transactions arrive.

Ah, thanks for that!

Here's more info on it:

How to use Walletnotify?
 - https://bitcointalksearch.org/topic/how-to-use-walletnotify-203438
kjj
legendary
Activity: 1302
Merit: 1026
May 28, 2013, 09:22:27 AM
#4
The 8.2 release candidates include a -walletnotify option that can run a process when a transaction that affects the wallet is seen.  It would be fairly simple to write a script for that to call curl or wget to create a HTTP callback.

If your bitcoind is busy (or will be some day), or if the callback server is unreliable, it would be wiser to do it in two stages.  The -walletnotify could drop an entry into a database, and a second process could read those entries and execute the calls.  The reason is that the -walletnotify process needs to return promptly to avoid runaway processes.
full member
Activity: 154
Merit: 100
May 28, 2013, 09:16:52 AM
#3
Actually, there are two command line switches -blocknotify and -walletnotify which will call a command when a block is found and when transactions arrive.

Honestly, I would avoid using listsinceblock, it doesn't behave as you'd expect and it'll come back to bite you.
legendary
Activity: 2506
Merit: 1010
May 28, 2013, 09:05:14 AM
#2
What is the best way to get an HTTP callback when bitcoind client receive an input/output transaction?

Thank you all

The Bitcoin-Qt/bitcoind client does not have any callback, so the main method employed currently is to poll the client to discover new transactions (using listsinceblock).

BitcoinJ does support this with a PeerEventListener interface:
 - http://bitcoin.stackexchange.com/a/8133/153

Also, BitsOfProof possibly supports a callback for new transactions as well.

[Edit: And most payment processors, e.g., BitPay,  provide this within their API.]

[Edit2: And you can configure Blockchain.info/wallet to notify you:
 - http://blockchain.info/wallet/payment-notifications ]
hero member
Activity: 556
Merit: 501
CryptoTalk.Org - Get Paid for every Post!
May 28, 2013, 08:26:27 AM
#1
What is the best way to get an HTTP callback when bitcoind client receive an input/output transaction?

Thank you all
Jump to: