diff --git a/freqtrade/exchange/okx.py b/freqtrade/exchange/okx.py index ddbb85ea7..c933153f5 100644 --- a/freqtrade/exchange/okx.py +++ b/freqtrade/exchange/okx.py @@ -77,11 +77,17 @@ class Okx(Exchange): tiers: Dict[str, List[Dict]] = {} + # Be verbose here, as this delays startup by ~1 minute. + logger.info( + f"Initializing leverage_tiers for {len(symbols)} markets. " + "This will take about a minute.") + for symbol in symbols: res = self._api.fetchLeverageTiers(symbol) tiers[symbol] = [] for tier in res[symbol]: tiers[symbol].append(self.parse_leverage_tier(tier)) + logger.info(f"Done initializing {len(symbols)} markets.") return tiers else: diff --git a/requirements.txt b/requirements.txt index 160c8ba56..1fb95603e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ numpy==1.22.2 pandas==1.4.0 pandas-ta==0.3.14b -ccxt==1.72.36 +ccxt==1.73.3 # Pin cryptography for now due to rust build errors with piwheels cryptography==36.0.1 aiohttp==3.8.1 diff --git a/setup.py b/setup.py index 380b0d796..6cad4d804 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ setup( ], install_requires=[ # from requirements.txt - 'ccxt>=1.72.29', + 'ccxt>=1.73.1', 'SQLAlchemy', 'python-telegram-bot>=13.4', 'arrow>=0.17.0', diff --git a/tests/exchange/test_ccxt_compat.py b/tests/exchange/test_ccxt_compat.py index 73af6af3e..44bd68a31 100644 --- a/tests/exchange/test_ccxt_compat.py +++ b/tests/exchange/test_ccxt_compat.py @@ -329,7 +329,7 @@ class TestCCXTExchange(): assert 0 < exchange.get_fee(pair, 'market', 'buy') < threshold assert 0 < exchange.get_fee(pair, 'market', 'sell') < threshold - def test_get_max_leverage_spot(self, exchange): + def test_ccxt_get_max_leverage_spot(self, exchange): spot, spot_name = exchange if spot: leverage_in_market_spot = EXCHANGES[spot_name]['leverage_in_market']['spot'] @@ -339,7 +339,7 @@ class TestCCXTExchange(): assert (isinstance(spot_leverage, float) or isinstance(spot_leverage, int)) assert spot_leverage >= 1.0 - def test_get_max_leverage_futures(self, exchange_futures): + def test_ccxt_get_max_leverage_futures(self, exchange_futures): futures, futures_name = exchange_futures # TODO-lev: binance, gateio, and okx test if futures: @@ -364,17 +364,17 @@ class TestCCXTExchange(): assert (isinstance(contract_size, float) or isinstance(contract_size, int)) assert contract_size >= 0.0 - # def test_get_liquidation_price_compat(): + # def test_ccxt_get_liquidation_price(): # return # TODO-lev - # def test_liquidation_price_compat(): + # def test_ccxt_liquidation_price(): # return # TODO-lev - # def test_get_max_pair_stake_amount_compat(): + # def test_ccxt_get_max_pair_stake_amount(): # return # TODO-lev - # def test_load_leverage_tiers_compat(): + # def test_ccxt_load_leverage_tiers(): # return # TODO-lev - # def test_get_maintenance_ratio_and_amt_compat(): + # def test_ccxt_get_maintenance_ratio_and_amt(): # return # TODO-lev