diff --git a/freqtrade/rpc/fiat_convert.py b/freqtrade/rpc/fiat_convert.py index cbe4c0045..512e0947a 100644 --- a/freqtrade/rpc/fiat_convert.py +++ b/freqtrade/rpc/fiat_convert.py @@ -3,8 +3,8 @@ Module that define classes to convert Crypto-currency to FIAT e.g BTC to USD """ -import datetime import logging +from datetime import datetime from typing import Dict, List from cachetools import TTLCache @@ -67,7 +67,7 @@ class CryptoToFiatConverter(LoggingMixin): logger.warning( "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 + self._backoff = datetime.now().timestamp() + 60 return # If the request is not a 429 error we want to raise the normal error logger.error( @@ -81,7 +81,7 @@ class CryptoToFiatConverter(LoggingMixin): def _get_gekko_id(self, crypto_symbol): if not self._coinlistings: - if self._backoff <= datetime.datetime.now().timestamp(): + if self._backoff <= datetime.now().timestamp(): self._load_cryptomap() # Still not loaded. if not self._coinlistings: