2025.07.21

This commit is contained in:
Nicolás Sánchez 2025-07-21 16:18:06 -03:00
parent 18ff158b1d
commit e49945ddbc
3 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,6 @@
2025.07.21:
. Corrected an error in switch_to_long.
2025.07.18:
. Changed Waitress' logging level to ERROR.

View File

@ -16,7 +16,7 @@ import exchange_wrapper
import trader
version = "2025.07.18"
version = "2025.07.21"
'''
Color definitions. If you want to change them, check the reference at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

View File

@ -632,6 +632,10 @@ class trader:
#Sell all base currency
self.liquidate_base(ignore_profits=ignore_old_long, already_received_quote=already_received_quote)
if self.config.get_liquidate_after_switch():
self.quit = True
return 1
#Rewrite config file (if it exists)
if os.path.isfile(f"configs/{self.base}{self.quote}.bak") and os.path.isfile(f"configs/{self.base}{self.quote}.json"):
@ -1001,9 +1005,7 @@ class trader:
#Sell all base (market), report the profits and restart the trader
self.status.set_pause_reason("automatic_switch")
self.switch_to_long(already_received_quote=self.status.get_quote_spent())
if self.config.get_liquidate_after_switch():
self.quit = True
else:
if not self.config.get_liquidate_after_switch():
self.restart = True
return 1