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

34
main.py
View File

@ -311,40 +311,18 @@ def main_loop():
futures.append(future)
online_pairs.append(f"{instance.base}{instance.quote}")
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):
try:
future.result()
except Exception as 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
top = 0
for instance in running_traders: