This flow instantly exchanges a defined percentage of Bitcoin amount from each paid invoice to fiat using Kraken.
It is useful when you have to convert some part of your Bitcoin revenue to fiat to cover business expenses and want to cut the short term volatility risks.
This flow requires the following node to be installed on your Node-RED:
Configuration & Setup
- Import the Node-RED Flow
- Open the "Configuration nodes" panel in Node-RED (via tabs on the right panel or
ctrl-g cshortcut) and configure the config-nodes:
- Double-click the initial "/btcpay-ipn" node and configure it to receive POST notifications from your BTCPay Server
- Now add the notification URL to the processes that create invoices for you. Calls to BTCPay's Create Invoice API should have the
notificationUrlproperty with the URL you specified in the previous step
- Double-click the "🔨 Volume calc" node and set your formula for calculating the amount of Bitcoin to exchange (by default, the flow calcs 20% of the amount)
- Double-click the "🔨 Order params" node and change the params of Kraken orders (by default, the flow adds market orders to sell on BTCUSD)
- Done! Now the flow will automatically add an order on Kraken for each paid invoice.