minor cleanup

This commit is contained in:
Nicolás Sánchez 2025-08-16 12:40:40 -03:00
parent 6c72b35b29
commit 00c6157d2e
1 changed files with 6 additions and 28 deletions

32
main.py
View File

@ -312,39 +312,17 @@ def main_loop():
online_pairs.append(f"{instance.base}{instance.quote}") online_pairs.append(f"{instance.base}{instance.quote}")
pairs_to_fetch.append(instance.config.get_pair()) pairs_to_fetch.append(instance.config.get_pair())
#Fetch prices
price_list = broker.get_prices(pairs_to_fetch)
#Here, assign the prices to the dusters (if any)
for future in as_completed(futures): for future in as_completed(futures):
try: try:
future.result() future.result()
except Exception as e: except Exception as e:
broker.logger.log_this(f"Error in thread - {e}") broker.logger.log_this(f"Error in thread - {e}")
#Here, append the dusters' pairs to pairs_to_fetch, if missing.
#
#
#
#
#
#Start the trader threads
# for t in threads:
# try:
# t.start()
# except Exception as e:
# broker.logger.log_this(f"Error starting thread - {e}")
# #Wait for the trader threads to complete
# for t in threads:
# try:
# t.join()
# except Exception as e:
# broker.logger.log_this(f"Error joining thread: {e}")
# threads.clear()
#Fetch prices
price_list = broker.get_prices(pairs_to_fetch)
#Here, assign the prices to the dusters (if any)
curr = 0 curr = 0
top = 0 top = 0
for instance in running_traders: for instance in running_traders: