mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
freqtradebot.get_valid_enter_price_and_stake gets min of stake_amount and max_stake_amount before calling wallets.validate_stake_amount
This commit is contained in:
parent
a50f4d2c57
commit
30c476e3c1
|
@ -866,6 +866,7 @@ class FreqtradeBot(LoggingMixin):
|
|||
entry_tag=entry_tag, side=trade_side
|
||||
)
|
||||
|
||||
stake_amount = min(stake_amount, max_stake_amount)
|
||||
stake_amount = self.wallets.validate_stake_amount(pair, stake_amount, min_stake_amount)
|
||||
|
||||
return enter_limit_requested, stake_amount
|
||||
|
|
|
@ -743,6 +743,7 @@ def test_execute_entry(mocker, default_conf_usdt, fee, limit_order,
|
|||
(open_rate - (wallet_balance / position)) / (1 - (mm_ratio + taker_fee_rate))
|
||||
(10 - (2 / 1)) / (1 - (0.01 + 0.0006)) = 8.085708510208207
|
||||
"""
|
||||
# TODO: Parametrize this test
|
||||
open_order = limit_order_open[enter_side(is_short)]
|
||||
order = limit_order[enter_side(is_short)]
|
||||
default_conf_usdt['trading_mode'] = trading_mode
|
||||
|
|
Loading…
Reference in New Issue
Block a user