Use constants

This commit is contained in:
Anton
2018-05-25 17:04:08 +03:00
parent cf5d691950
commit 3427c7eb54
5 changed files with 10 additions and 8 deletions

View File

@@ -259,7 +259,7 @@ class FreqtradeBot(object):
stake_amount = self.config['stake_amount']
avaliable_amount = exchange.get_balance(self.config['stake_currency'])
if stake_amount == 'unlimited':
if stake_amount == constants.UNLIMITED_STAKE_AMOUNT:
open_trades = len(Trade.query.filter(Trade.is_open.is_(True)).all())
if open_trades == self.config['max_open_trades']:
return 0