From 99e3e265421985c5880dfe39f3897c4be73905a7 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 14 Feb 2022 19:14:40 +0100 Subject: [PATCH 1/3] Adjust ccxt test naming to align with the other tests --- tests/exchange/test_ccxt_compat.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 From 515b3fdfd2e6d863a8c14ebabf7a041aaecaef53 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 14 Feb 2022 19:42:15 +0100 Subject: [PATCH 2/3] Version bump ccxt --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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', From 513669f834bf60901ae0c6268ac66f2510834b38 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 14 Feb 2022 19:44:05 +0100 Subject: [PATCH 3/3] Be verbose on okex startup to point out delay. --- freqtrade/exchange/okx.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/freqtrade/exchange/okx.py b/freqtrade/exchange/okx.py index bd2913932..508eded1f 100644 --- a/freqtrade/exchange/okx.py +++ b/freqtrade/exchange/okx.py @@ -75,9 +75,14 @@ class Okx(Exchange): symbols.append(symbol) tiers = {} + # 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] = res[symbol] + logger.info(f"Done initializing {len(symbols)} markets.") return tiers else: