Bitcoin wallet transaction callback

Is it possible that the Bitcoin client (working in server mode) will send an HTTP request after receiving the transaction and be confirmed? That is, to send to a PHP script for a callback / confirmation.

+4
source share
2 answers

This is possible using the walletnotify parameter in your bitcoin.conf file.

walletnotify=/home/bitcoin/transaction.sh %s 

This will call transaction.sh script with txid as a parameter. From there, you can basically do something.

For instance:

 #!/bin/sh curl -d "txid=$1" http://127.0.0.1/callback 

Note: The address you want to control must be part of your wallet.

+2
source

you can analyze https://blockchain.info/rawaddr/ $ bitcoin_address api for new transactions

0
source

Source: https://habr.com/ru/post/1414355/


All Articles