Don't reset open-order-id just yet
it's needed to get the fees
This commit is contained in:
parent
06125df10c
commit
838985f6a0
@ -606,7 +606,6 @@ class FreqtradeBot:
|
||||
stake_amount = order['cost']
|
||||
amount = safe_value_fallback(order, 'filled', 'amount')
|
||||
buy_limit_filled_price = safe_value_fallback(order, 'average', 'price')
|
||||
order_id = None
|
||||
|
||||
# in case of FOK the order may be filled immediately and fully
|
||||
elif order_status == 'closed':
|
||||
|
@ -1057,7 +1057,7 @@ def test_execute_buy(mocker, default_conf, fee, limit_buy_order, limit_buy_order
|
||||
assert freqtrade.execute_buy(pair, stake_amount)
|
||||
trade = Trade.query.all()[3]
|
||||
assert trade
|
||||
assert trade.open_order_id is None
|
||||
assert trade.open_order_id == '555'
|
||||
assert trade.open_rate == 0.5
|
||||
assert trade.stake_amount == 40.495905365
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user