From 00c6157d2e9ca969259903f3f88205052ab74528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20S=C3=A1nchez?= Date: Sat, 16 Aug 2025 12:40:40 -0300 Subject: [PATCH] minor cleanup --- main.py | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/main.py b/main.py index 56af142..627279a 100644 --- a/main.py +++ b/main.py @@ -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: