After you decide to cancel the bot, it’ll cancel all the grid orders from your exchange and stop running immediately. Your funds will remain with the same allocation at the moment it stop running.