Merge pull request #4309 from freqtrade/extract_stake_amount

Move get_trade_stake_amount to wallets
This commit is contained in:
Matthias
2021-02-05 19:47:30 +01:00
committed by GitHub
5 changed files with 104 additions and 93 deletions

View File

@@ -590,7 +590,8 @@ 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.wallets.get_trade_stake_amount(
pair, self._freqtrade.get_free_open_trades())
# execute buy
if self._freqtrade.execute_buy(pair, stakeamount, price):