From 27a6dcf3fc13821006903573d330c06cecf9b169 Mon Sep 17 00:00:00 2001 From: misagh Date: Thu, 22 Nov 2018 21:23:35 +0100 Subject: [PATCH] getting available balance from wallet instead of API call. --- freqtrade/freqtradebot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 8a2db84a9..49a4959c1 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -338,8 +338,8 @@ class FreqtradeBot(object): stake_amount = self.config['stake_amount'] # TODO: should come from the wallet - avaliable_amount = self.exchange.get_balance(self.config['stake_currency']) - # avaliable_amount = self.wallets.wallets[self.config['stake_currency']].free + #avaliable_amount = self.exchange.get_balance(self.config['stake_currency']) + avaliable_amount = self.wallets.wallets[self.config['stake_currency']].free if stake_amount == constants.UNLIMITED_STAKE_AMOUNT: open_trades = len(Trade.query.filter(Trade.is_open.is_(True)).all())