minor: fix typo in freqtradebot.py

This commit is contained in:
hroff-1902 2019-06-17 04:35:39 +03:00
parent 2369161bb0
commit d217f32bbc

View File

@ -205,19 +205,19 @@ class FreqtradeBot(object):
else: else:
stake_amount = self.config['stake_amount'] stake_amount = self.config['stake_amount']
avaliable_amount = self.wallets.get_free(self.config['stake_currency']) available_amount = self.wallets.get_free(self.config['stake_currency'])
if stake_amount == constants.UNLIMITED_STAKE_AMOUNT: if stake_amount == constants.UNLIMITED_STAKE_AMOUNT:
open_trades = len(Trade.get_open_trades()) open_trades = len(Trade.get_open_trades())
if open_trades >= self.config['max_open_trades']: if open_trades >= self.config['max_open_trades']:
logger.warning('Can\'t open a new trade: max number of trades is reached') logger.warning('Can\'t open a new trade: max number of trades is reached')
return None return None
return avaliable_amount / (self.config['max_open_trades'] - open_trades) return available_amount / (self.config['max_open_trades'] - open_trades)
# Check if stake_amount is fulfilled # Check if stake_amount is fulfilled
if avaliable_amount < stake_amount: if available_amount < stake_amount:
raise DependencyException( raise DependencyException(
f"Available balance({avaliable_amount} {self.config['stake_currency']}) is " f"Available balance({available_amount} {self.config['stake_currency']}) is "
f"lower than stake amount({stake_amount} {self.config['stake_currency']})" f"lower than stake amount({stake_amount} {self.config['stake_currency']})"
) )