pull down to refresh

i use this script every now and then to manually rebalance a peer. i have been using Balance of Satoshi but you can also you Rebalance.py.

In this example i am trying to get outbound liquidity to Kraken. I am avoiding the last hop whose fee is less than 350ppm. because if you have a lower ppm it most likely is drained already or barely enough liquidity. You can use whatever fees and amounts you want.

$ touch <file name>
$ chmod +x <textfile> gives executable command for the <textfile> script. So ./<text.sh> runs <text.sh> script
$ nano <text.sh>

Find your path to bos
$ which bos

Enter this into the blank screen

#!/bin/bash

/home/umbrel/.npm-global/bin/bos rebalance --out <peer> --in kraken --amount 50000000 --max-fee-rate 750 --avoid-high-fee-routes --max-fee 35000 --avoid "fee_rate<350/02f1a8c87607f415c8f22c00593002775941dea48869ce23096af27b0cfdcc0b69"
while [ $? -lt 1 ]; do
echo "!!!SUCCESS!!! Trying again..."
/home/umbrel/.npm-global/bin/bos rebalance --out <peer> --in kraken --amount 50000000 --max-fee-rate 750 --avoid-high-fee-routes --max-fee 35000 --avoid "fee_rate<350/02f1a8c87607f415c8f22c00593002775941dea48869ce23096af27b0cfdcc0b69"
done

CTRL +X to exit the screen
Now run:

$ ./<text.sh>

and CTRL +C to exit the command.