2025.11.11

This commit is contained in:
Nicolás Sánchez 2025-11-18 20:46:49 -03:00
parent 7c33dd231d
commit 536866364c
4 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2025.11.11:
. deals_cache and log_list cache are now 20 items long.
. Less log spam.
2025.11.08: 2025.11.08:
. broker.set_default_order_size() now saves the config file to disk after changing the value. . broker.set_default_order_size() now saves the config file to disk after changing the value.
. Variable renaming and other small stuff. . Variable renaming and other small stuff.

View File

@ -51,7 +51,7 @@ class Broker:
self.markets = self.exchange.load_markets() self.markets = self.exchange.load_markets()
#Populates deals cache #Populates deals cache
self.deals_cache_length = 10 self.deals_cache_length = 20
self.deals_list = self.preload_deals(amount_to_preload=self.deals_cache_length) self.deals_list = self.preload_deals(amount_to_preload=self.deals_cache_length)
@ -1052,7 +1052,7 @@ class Logger:
self.broker_config = broker_config self.broker_config = broker_config
self.exchange_name = self.broker_config["exchange"] self.exchange_name = self.broker_config["exchange"]
self.tg_credentials = credentials.get_credentials("telegram") self.tg_credentials = credentials.get_credentials("telegram")
self.log_list_max_length = 10 self.log_list_max_length = 20 # log cache
self.log_list = collections.deque(maxlen=self.log_list_max_length) self.log_list = collections.deque(maxlen=self.log_list_max_length)
self.preload_logs() self.preload_logs()

View File

@ -18,7 +18,7 @@ import exchange_wrapper
import trader import trader
version = "2025.11.08" version = "2025.11.11"
''' '''
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

@ -808,11 +808,11 @@ class trader:
partial_profit = market_order["cost"]-(avg_buy_price*partial_filled_amount)-self.parse_fees(market_order)[1] partial_profit = market_order["cost"]-(avg_buy_price*partial_filled_amount)-self.parse_fees(market_order)[1]
self.status.set_partial_profit(self.status.get_partial_profit()+partial_profit) self.status.set_partial_profit(self.status.get_partial_profit()+partial_profit)
break break
self.broker.logger.log_this("Waiting for partial fill sell order to fill.",1,self.status.get_pair()) self.broker.logger.log_this("Waiting for partial fill sell order to fill.",2,self.status.get_pair())
tries-=1 tries-=1
time.sleep(self.broker.get_wait_time()) time.sleep(self.broker.get_wait_time())
if tries==0: if tries==0:
self.broker.logger.log_this("Partial fill sell order not filling.",1,self.status.get_pair()) self.broker.logger.log_this("Partial fill sell order not filled.",1,self.status.get_pair())
break break
if not self.broker.check_for_duplicate_profit_in_db(filled_order): if not self.broker.check_for_duplicate_profit_in_db(filled_order):