From a43884f4720e7f6dfdeeba5659e1a3dc1f20fe49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20S=C3=A1nchez?= Date: Wed, 3 Jun 2026 19:45:16 -0300 Subject: [PATCH] . --- exchange_wrapper.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/exchange_wrapper.py b/exchange_wrapper.py index 69ff0d9..88ad781 100755 --- a/exchange_wrapper.py +++ b/exchange_wrapper.py @@ -95,7 +95,7 @@ class Broker: return 0 - def get_symbol(self,pair): + def get_symbol(self,pair: str): if "/" in pair: return pair for item in self.markets: @@ -118,7 +118,7 @@ class Broker: return {} - def validate_market(self,symbol): + def validate_market(self,symbol:str): ''' Checks that the market for the symbol exists, that it's a spot market and that it's active. Returns True if the market is valid, False otherwise. @@ -144,7 +144,7 @@ class Broker: return 1 - def get_trades_timestamps(self,pair,timespan,no_retries=False): + def get_trades_timestamps(self,pair:str ,timespan:int,no_retries=False): ''' Returns the timestamps of the last trades from the database for the boosting algorithm ''' @@ -314,8 +314,9 @@ class Broker: def remove_pair_from_config(self, pair: str): try: - if pair in self.broker_config["pairs"]: - self.broker_config["pairs"].remove(pair.replace("/","")) + symbol = pair.replace("/","") + if symbol in self.broker_config["pairs"]: + self.broker_config["pairs"].remove(symbol) return 0 self.logger.log_this("Pair does not exist - Can't remove from read_config",1,pair) return 2 @@ -359,7 +360,7 @@ class Broker: return 1 - def get_order_book(self,symbol,no_retries=False): + def get_order_book(self,symbol: str,no_retries=False): ''' Returns the complete orderbook '''