2

I am trying to create some app based on RPC API call from bitcoin core.

I want to make my btc core daemon send a notification whenever a new transaction is observed. Does BTC core RPC API have a websocket interface to make a call when new transaction happens ?

  • 1
    Do you want the call happen for every transaction on the network or just transactions in your wallet? – Andrew Chow Mar 19 '18 at 5:24
  • just on my wallet – Billy Adelphia Mar 20 '18 at 2:45
4

Since you only care about transactions involving your wallet, you can specify the walletnotify option in your bitcoin.conf or your bitcoind start command.

Since walletnotify allows you to execute an arbitrary command with the new tx info, it's fairly easy to make it call a webhook on your application, or invoke your application via the command line, or pass the information on in any number of other ways.

Your Answer

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

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