Combine stake_amount recalculation

This commit is contained in:
Matthias
2022-03-20 20:00:30 +01:00
parent f01c9cd28c
commit 4fd0681265
4 changed files with 21 additions and 13 deletions

View File

@@ -520,7 +520,8 @@ def test_update_market_order(market_buy_order_usdt, market_sell_order_usdt, fee,
fee_close=fee.return_value,
open_date=arrow.utcnow().datetime,
exchange='binance',
trading_mode=margin
trading_mode=margin,
leverage=1.0,
)
trade.open_order_id = 'something'
@@ -649,7 +650,8 @@ def test_calc_close_trade_price_exception(limit_buy_order_usdt, fee):
fee_open=fee.return_value,
fee_close=fee.return_value,
exchange='binance',
trading_mode=margin
trading_mode=margin,
leverage=1.0,
)
trade.open_order_id = 'something'
@@ -2231,6 +2233,7 @@ def test_recalc_trade_from_orders(fee):
exchange='binance',
open_rate=o1_rate,
max_rate=o1_rate,
leverage=1,
)
assert fee.return_value == 0.0025
@@ -2395,6 +2398,7 @@ def test_recalc_trade_from_orders_ignores_bad_orders(fee, is_short):
open_rate=o1_rate,
max_rate=o1_rate,
is_short=is_short,
leverage=1.0,
)
trade.update_fee(o1_fee_cost, 'BNB', fee.return_value, enter_side)
# Check with 1 order