getting available balance from wallet instead of API call.

This commit is contained in:
misagh 2018-11-22 21:23:35 +01:00
parent 1810fc9efa
commit 27a6dcf3fc

View File

@ -338,8 +338,8 @@ class FreqtradeBot(object):
stake_amount = self.config['stake_amount'] stake_amount = self.config['stake_amount']
# TODO: should come from the wallet # TODO: should come from the wallet
avaliable_amount = self.exchange.get_balance(self.config['stake_currency']) #avaliable_amount = self.exchange.get_balance(self.config['stake_currency'])
# avaliable_amount = self.wallets.wallets[self.config['stake_currency']].free avaliable_amount = self.wallets.wallets[self.config['stake_currency']].free
if stake_amount == constants.UNLIMITED_STAKE_AMOUNT: if stake_amount == constants.UNLIMITED_STAKE_AMOUNT:
open_trades = len(Trade.query.filter(Trade.is_open.is_(True)).all()) open_trades = len(Trade.query.filter(Trade.is_open.is_(True)).all())