use exchange.markets instead of expensive get_markets()
This commit is contained in:
parent
dcc86bfa55
commit
90cfd54864
@ -274,12 +274,7 @@ class FreqtradeBot(object):
|
|||||||
return stake_amount
|
return stake_amount
|
||||||
|
|
||||||
def _get_min_pair_stake_amount(self, pair: str, price: float) -> Optional[float]:
|
def _get_min_pair_stake_amount(self, pair: str, price: float) -> Optional[float]:
|
||||||
markets = self.exchange.get_markets()
|
market = self.exchange.markets[pair]
|
||||||
markets = [m for m in markets if m['symbol'] == pair]
|
|
||||||
if not markets:
|
|
||||||
raise ValueError(f'Can\'t get market information for symbol {pair}')
|
|
||||||
|
|
||||||
market = markets[0]
|
|
||||||
|
|
||||||
if 'limits' not in market:
|
if 'limits' not in market:
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user