_get_trade_stake_amount() is not private

This commit is contained in:
hroff-1902
2019-12-28 01:44:51 +03:00
parent 039dfc302c
commit b6d1c5b17a
3 changed files with 12 additions and 12 deletions

View File

@@ -204,7 +204,7 @@ class FreqtradeBot:
return used_rate
def _get_trade_stake_amount(self, pair) -> Optional[float]:
def get_trade_stake_amount(self, pair) -> Optional[float]:
"""
Check if stake amount can be fulfilled with the available balance
for the stake currency
@@ -309,7 +309,7 @@ class FreqtradeBot:
self.dataprovider.ohlcv(_pair, self.strategy.ticker_interval))
if buy and not sell and len(Trade.get_open_trades()) < self.config['max_open_trades']:
stake_amount = self._get_trade_stake_amount(_pair)
stake_amount = self.get_trade_stake_amount(_pair)
if not stake_amount:
continue

View File

@@ -462,7 +462,7 @@ class RPC:
raise RPCException(f'position for {pair} already open - id: {trade.id}')
# gen stake amount
stakeamount = self._freqtrade._get_trade_stake_amount(pair)
stakeamount = self._freqtrade.get_trade_stake_amount(pair)
# execute buy
if self._freqtrade.execute_buy(pair, stakeamount, price):