From e4092e1b8f72abdf6f8aa920aa3b7c97cb7eae5f Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 16 Aug 2026 15:18:29 +0200 Subject: [PATCH] fix: keyerror on shutdown --- freqtrade/freqtradebot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index be684c9cf1c..f339841a47a 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -209,7 +209,7 @@ def cleanup(self) -> None: try: # Wrap db activities in shutdown to avoid problems if database is gone, # and raises further exceptions. - if self.config["cancel_open_orders_on_exit"]: + if self.config.get("cancel_open_orders_on_exit"): self.cancel_all_open_orders() self.check_for_open_trades() @@ -314,7 +314,7 @@ def process_stopped(self) -> None: """ Close all orders that were left open """ - if self.config["cancel_open_orders_on_exit"]: + if self.config.get("cancel_open_orders_on_exit"): self.cancel_all_open_orders() def check_for_open_trades(self):