fix breaking tests

This commit is contained in:
Sam Germain
2022-02-12 21:59:26 -06:00
parent 531b4d238c
commit 8fe3f0c933
7 changed files with 434 additions and 195 deletions

View File

@@ -1960,12 +1960,14 @@ class Exchange:
'Looped through all tiers without finding a max leverage. Should never be reached'
)
else: # Search markets.limits for max lev
elif self.trading_mode == TradingMode.MARGIN: # Search markets.limits for max lev
market = self.markets[pair]
if market['limits']['leverage']['max'] is not None:
return market['limits']['leverage']['max']
else:
return 1.0 # Default if max leverage cannot be found
else:
return 1.0
@retrier
def _set_leverage(