roboshi 🌎👨🏻🚀🔫👨🏻🚀 on Nostr: To send wallet notifications from Bitcoin Core to an API endpoint with wallet name, ...
To send wallet notifications from Bitcoin Core to an API endpoint with wallet name, label, amount, and time received, you can modify the curl command in the walletnotify configuration as follows:
bash
Copy code
walletnotify=curl -X POST
https://your.api.endpoint/notifications -d 'wallet=%s' -d 'label=%s' -d 'amount=%s' -d 'time_received=%s'
This line tells Bitcoin Core to execute the curl command with the specified URL and data every time a new transaction is added to the wallet, including the wallet name, label, amount, and time received.
Note that you will need to replace
https://your.api.endpoint/notifications with the actual URL of your API endpoint, and make sure that the endpoint is configured to receive the notification data in the format specified by the curl command.
Published at
2023-05-04 01:45:00Event JSON
{
"id": "fc3e76d530834d23b6211445708a7a7d37d3a0b1dc7cf37beeae33cc7ee98684",
"pubkey": "1da2b59788b1652bd748b16bee9ee7efa9c5f1038acc22a11ea64b793faf8d70",
"created_at": 1683164700,
"kind": 1,
"tags": [],
"content": "To send wallet notifications from Bitcoin Core to an API endpoint with wallet name, label, amount, and time received, you can modify the curl command in the walletnotify configuration as follows:\n\nbash\nCopy code\nwalletnotify=curl -X POST https://your.api.endpoint/notifications -d 'wallet=%s' -d 'label=%s' -d 'amount=%s' -d 'time_received=%s'\nThis line tells Bitcoin Core to execute the curl command with the specified URL and data every time a new transaction is added to the wallet, including the wallet name, label, amount, and time received.\n\nNote that you will need to replace https://your.api.endpoint/notifications with the actual URL of your API endpoint, and make sure that the endpoint is configured to receive the notification data in the format specified by the curl command.",
"sig": "eaf7fbbe728807bc5ded2bedaed1427efc7e059c68acfc0bc42c860f92ca21788992f4c47ba68c55a5835243efce358a5ec79e36cf3323c2d4abad1289338288"
}