Simplify tradingmode parsing

This commit is contained in:
Matthias
2021-11-18 19:56:59 +01:00
parent 4f0a73010a
commit 8638e6fe47
3 changed files with 7 additions and 11 deletions

View File

@@ -130,11 +130,8 @@ class Exchange:
self._trades_pagination = self._ft_has['trades_pagination']
self._trades_pagination_arg = self._ft_has['trades_pagination_arg']
self.trading_mode: TradingMode = (
TradingMode(config.get('trading_mode'))
if config.get('trading_mode')
else TradingMode.SPOT
)
self.trading_mode = TradingMode(config.get('trading_mode', 'spot'))
self.collateral: Optional[Collateral] = (
Collateral(config.get('collateral'))
if config.get('collateral')