From 9dfc063e236ea4fc9ebbcc58612e8d95f0702e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20S=C3=A1nchez?= Date: Fri, 31 Jan 2025 16:10:26 -0300 Subject: [PATCH] check_status does not return 1 if self.so is None --- changelog.txt | 3 +++ main.py | 2 +- trader.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index a2db1f3..26fce96 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +2025.01.31: +. In check_status, when safety order = None it does not return 1 anymore. + 2025.01.10: . Added is_paused to status_dict. diff --git a/main.py b/main.py index a457e2c..f92c914 100644 --- a/main.py +++ b/main.py @@ -24,7 +24,7 @@ In case the permissions of the certificate changes, reset them this way: # ll /etc/letsencrypt/ ''' -version = "2025.01.10" +version = "2025.01.31" ''' Color definitions. If you want to change them, check the reference at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors diff --git a/trader.py b/trader.py index ae429ba..8192271 100755 --- a/trader.py +++ b/trader.py @@ -1116,7 +1116,7 @@ class trader: #Here, would it be wise to attempt to reload the safety order from the status dict? self.broker.logger.log_this("Safety order is None",1,self.pair) self.so = self.broker.get_empty_order() - return 1 + #return 1 if self.tp_order["id"]=="": self.broker.logger.log_this(f"Take profit order missing. Stopping bot. Order ID: {self.tp_order['id']}",1,self.pair) self.broker.cancel_order(self.so["id"],self.pair)