Extract close method for exchange

This commit is contained in:
Matthias
2021-02-06 10:22:59 +01:00
parent 4ce4eadc23
commit b5177eadab
2 changed files with 4 additions and 0 deletions

View File

@@ -661,6 +661,7 @@ class Hyperopt:
dump(preprocessed, self.data_pickle_file)
# We don't need exchange instance anymore while running hyperopt
self.backtesting.exchange.close()
self.backtesting.exchange._api = None # type: ignore
self.backtesting.exchange._api_async = None # type: ignore
# self.backtesting.exchange = None # type: ignore