|
|
|
|
@ -170,7 +170,9 @@ class Exchange:
|
|
|
|
|
|
|
|
|
|
def close(self):
|
|
|
|
|
logger.debug("Exchange object destroyed, closing async loop")
|
|
|
|
|
if self._api_async and inspect.iscoroutinefunction(self._api_async.close):
|
|
|
|
|
if (self._api_async and inspect.iscoroutinefunction(self._api_async.close)
|
|
|
|
|
and self._api_async.session):
|
|
|
|
|
logger.info("Closing async ccxt session.")
|
|
|
|
|
asyncio.get_event_loop().run_until_complete(self._api_async.close())
|
|
|
|
|
|
|
|
|
|
def _init_ccxt(self, exchange_config: Dict[str, Any], ccxt_module: CcxtModuleType = ccxt,
|
|
|
|
|
|