Init FIAT converter in api_server.py
This commit is contained in:
parent
81850b5fdf
commit
99ac2659f3
@ -17,6 +17,7 @@ from werkzeug.serving import make_server
|
|||||||
|
|
||||||
from freqtrade.__init__ import __version__
|
from freqtrade.__init__ import __version__
|
||||||
from freqtrade.rpc.rpc import RPC, RPCException
|
from freqtrade.rpc.rpc import RPC, RPCException
|
||||||
|
from freqtrade.rpc.fiat_convert import CryptoToFiatConverter
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -105,6 +106,9 @@ class ApiServer(RPC):
|
|||||||
# Register application handling
|
# Register application handling
|
||||||
self.register_rest_rpc_urls()
|
self.register_rest_rpc_urls()
|
||||||
|
|
||||||
|
if self._config.get('fiat_display_currency', None):
|
||||||
|
self._fiat_converter = CryptoToFiatConverter()
|
||||||
|
|
||||||
thread = threading.Thread(target=self.run, daemon=True)
|
thread = threading.Thread(target=self.run, daemon=True)
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user