From 7db3c846b4c387c7e68c0ff285989c2f1f842cc9 Mon Sep 17 00:00:00 2001 From: topscoder <86197446+topscoder@users.noreply.github.com> Date: Fri, 1 Apr 2022 20:52:16 +0200 Subject: [PATCH 1/2] Fixes CoinGecko typos in fiat_convert.py --- freqtrade/rpc/fiat_convert.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/rpc/fiat_convert.py b/freqtrade/rpc/fiat_convert.py index 70f3647b6..2ad844d57 100644 --- a/freqtrade/rpc/fiat_convert.py +++ b/freqtrade/rpc/fiat_convert.py @@ -63,7 +63,7 @@ class CryptoToFiatConverter: except RequestException as request_exception: if "429" in str(request_exception): logger.warning( - "Too many requests for Coingecko API, backing off and trying again later.") + "Too many requests for CoinGecko API, backing off and trying again later.") # Set backoff timestamp to 60 seconds in the future self._backoff = datetime.datetime.now().timestamp() + 60 return @@ -96,7 +96,7 @@ class CryptoToFiatConverter: if len(found) > 0: # Wrong! - logger.warning(f"Found multiple mappings in goingekko for {crypto_symbol}.") + logger.warning(f"Found multiple mappings in CoinGecko for {crypto_symbol}.") return None def convert_amount(self, crypto_amount: float, crypto_symbol: str, fiat_symbol: str) -> float: @@ -160,7 +160,7 @@ class CryptoToFiatConverter: def _find_price(self, crypto_symbol: str, fiat_symbol: str) -> float: """ - Call CoinGekko API to retrieve the price in the FIAT + Call CoinGecko API to retrieve the price in the FIAT :param crypto_symbol: Crypto-currency you want to convert (e.g btc) :param fiat_symbol: FIAT currency you want to convert to (e.g usd) :return: float, price of the crypto-currency in Fiat From 60d52f0a209520602493124f385716ef0fbfa1d8 Mon Sep 17 00:00:00 2001 From: topscoder <86197446+topscoder@users.noreply.github.com> Date: Fri, 1 Apr 2022 20:57:09 +0200 Subject: [PATCH 2/2] Consistent CoinGecko naming in test_fiat_convert.py --- tests/rpc/test_fiat_convert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/rpc/test_fiat_convert.py b/tests/rpc/test_fiat_convert.py index c87cea259..0dfa20185 100644 --- a/tests/rpc/test_fiat_convert.py +++ b/tests/rpc/test_fiat_convert.py @@ -137,7 +137,7 @@ def test_fiat_too_many_requests_response(mocker, caplog): assert len(fiat_convert._coinlistings) == 0 assert fiat_convert._backoff > datetime.datetime.now().timestamp() assert log_has( - 'Too many requests for Coingecko API, backing off and trying again later.', + 'Too many requests for CoinGecko API, backing off and trying again later.', caplog ) @@ -156,7 +156,7 @@ def test_fiat_multiple_coins(mocker, caplog): assert fiat_convert._get_gekko_id('hnt') is None assert fiat_convert._get_gekko_id('eth') == 'ethereum' - assert log_has('Found multiple mappings in goingekko for hnt.', caplog) + assert log_has('Found multiple mappings in CoinGecko for hnt.', caplog) def test_fiat_invalid_response(mocker, caplog):