exchange.get_max_leverage de-complex
This commit is contained in:
parent
9e599455e7
commit
60a45ff394
@ -1935,19 +1935,16 @@ class Exchange:
|
||||
)
|
||||
|
||||
if pair not in self._leverage_tiers:
|
||||
tiers = self.get_leverage_tiers_for_pair(pair)
|
||||
if not tiers: # Not a leveraged market
|
||||
self.get_leverage_tiers_for_pair(pair)
|
||||
|
||||
pair_tiers = self._leverage_tiers[pair]
|
||||
num_tiers = len(pair_tiers)
|
||||
if num_tiers < 1:
|
||||
return 1.0
|
||||
|
||||
if stake_amount == 0:
|
||||
return self._leverage_tiers[pair][0]['lev'] # Max lev for lowest amount
|
||||
|
||||
pair_tiers = self._leverage_tiers[pair]
|
||||
num_tiers = len(pair_tiers)
|
||||
|
||||
if num_tiers < 1:
|
||||
return 1.0
|
||||
|
||||
for tier_index in range(num_tiers):
|
||||
|
||||
tier = pair_tiers[tier_index]
|
||||
|
Loading…
Reference in New Issue
Block a user