From 171738fa4dde8ba1f02454309397cc0e0b6c5029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20S=C3=A1nchez?= Date: Sun, 21 Sep 2025 18:23:14 -0300 Subject: [PATCH] 2025.09.21 --- changelog.txt | 3 +++ exchange_wrapper.py | 1 - main.py | 2 +- trader.py | 5 +++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 918b024..bf5478d 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +2025.09.21: +. Fixed a bug that caused short traders to have an incorrect order size. + 2025.09.20: . Fixed bug that caused short traders to initialize using the same workflow as a long one. diff --git a/exchange_wrapper.py b/exchange_wrapper.py index f060dc8..192204b 100755 --- a/exchange_wrapper.py +++ b/exchange_wrapper.py @@ -760,7 +760,6 @@ class Broker: order_to_send = self.exchange.create_order(symbol,"market",side,amount) time.sleep(self.wait_time) - # Wait a bit more when dealing with Kucoin return self.get_order(order_to_send["id"],symbol) except Exception as e: diff --git a/main.py b/main.py index 4b79af1..bee868c 100644 --- a/main.py +++ b/main.py @@ -18,7 +18,7 @@ import exchange_wrapper import trader -version = "2025.09.20" +version = "2025.09.21" ''' 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 6fbd4d0..3891830 100755 --- a/trader.py +++ b/trader.py @@ -191,9 +191,10 @@ class trader: #Slippage threshold exceeded self.broker.logger.log_this("Slippage threshold exceeded",1,self.status.get_pair()) return 3 - + self.status.set_order_size(self.config.get_order_size()) + self.status.set_pause_reason("start_trader - after slippage") - self.status.set_order_size(self.config.get_order_size()) + #Sending initial order self.status.set_pause_reason("start_trader - sending first order")