2025.09.19

This commit is contained in:
Nicolás Sánchez 2025-09-19 17:47:15 -03:00
parent 733f6efbff
commit 451e1a63aa
3 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,6 @@
2025.09.19:
. Added pageSize parameter to the open order requests when querying Kucoin.
2025.09.18: 2025.09.18:
. do_cleanup now uses get_min_quote_size. . do_cleanup now uses get_min_quote_size.
. Added an extra price check to switch_to_long. . Added an extra price check to switch_to_long.

View File

@ -536,7 +536,7 @@ class Broker:
if pairs is None: if pairs is None:
pairs = [] pairs = []
try: try:
if self.get_exchange_name() in ["binance","kucoin"]: if self.get_exchange_name()=="binance":
if self.broker_config.get("unified_order_query"): if self.broker_config.get("unified_order_query"):
return self.exchange.fetch_open_orders() return self.exchange.fetch_open_orders()
result = [] result = []
@ -544,6 +544,8 @@ class Broker:
a = self.exchange.fetch_open_orders(pair) a = self.exchange.fetch_open_orders(pair)
result.extend(iter(a)) result.extend(iter(a))
return result return result
elif self.get_exchange_name()=="kucoin":
return self.exchange.fetch_open_orders(params={"pageSize": "500"})
else: else:
return self.exchange.fetch_open_orders() return self.exchange.fetch_open_orders()
except Exception as e: except Exception as e:
@ -566,7 +568,7 @@ class Broker:
return self.get_closed_orders_binance(pairs) return self.get_closed_orders_binance(pairs)
return self.get_closed_orders() return self.get_closed_orders()
except Exception as e: except Exception as e:
self.logger.log_this(f"Exception in fetch_open_orders: {e}",2) self.logger.log_this(f"Exception in fetch_closed_orders: {e}",2)
return [] return []

View File

@ -18,7 +18,7 @@ import exchange_wrapper
import trader import trader
version = "2025.09.18" version = "2025.09.19"
''' '''
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
@ -41,7 +41,7 @@ executor = None
#Shutdown handler #Shutdown handler
def shutdown_handler(signum, _): def shutdown_handler(signum, _):
broker.logger.log_this(f"Received signal {signum}, shutting down as gracefully as possible...", 2) broker.logger.log_this(f"Received signal {signum}, shutting down.", 2)
if executor: if executor:
executor.shutdown(wait=True, timeout=5) executor.shutdown(wait=True, timeout=5)
os_exit(0) os_exit(0)