check_status does not return 1 if self.so is None

This commit is contained in:
Nicolás Sánchez 2025-01-31 16:10:26 -03:00
parent d29355d021
commit 9dfc063e23
3 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,6 @@
2025.01.31:
. In check_status, when safety order = None it does not return 1 anymore.
2025.01.10: 2025.01.10:
. Added is_paused to status_dict. . Added is_paused to status_dict.

View File

@ -24,7 +24,7 @@ In case the permissions of the certificate changes, reset them this way:
# ll /etc/letsencrypt/ # 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 Color definitions. If you want to change them, check the reference at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

View File

@ -1116,7 +1116,7 @@ class trader:
#Here, would it be wise to attempt to reload the safety order from the status dict? #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.broker.logger.log_this("Safety order is None",1,self.pair)
self.so = self.broker.get_empty_order() self.so = self.broker.get_empty_order()
return 1 #return 1
if self.tp_order["id"]=="": 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.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) self.broker.cancel_order(self.so["id"],self.pair)