mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Add explicit test for okx cancel_stop
This commit is contained in:
parent
cfe88f06d2
commit
2806110869
|
@ -596,3 +596,15 @@ def test_stoploss_adjust_okx(mocker, default_conf, sl1, sl2, sl3, side):
|
||||||
}
|
}
|
||||||
assert exchange.stoploss_adjust(sl1, order, side=side)
|
assert exchange.stoploss_adjust(sl1, order, side=side)
|
||||||
assert not exchange.stoploss_adjust(sl2, order, side=side)
|
assert not exchange.stoploss_adjust(sl2, order, side=side)
|
||||||
|
|
||||||
|
|
||||||
|
def test_stoploss_cancel_okx(mocker, default_conf):
|
||||||
|
exchange = get_patched_exchange(mocker, default_conf, id='okx')
|
||||||
|
|
||||||
|
exchange.cancel_order = MagicMock()
|
||||||
|
|
||||||
|
exchange.cancel_stoploss_order('1234', 'ETH/USDT')
|
||||||
|
assert exchange.cancel_order.call_count == 1
|
||||||
|
assert exchange.cancel_order.call_args_list[0][1]['order_id'] == '1234'
|
||||||
|
assert exchange.cancel_order.call_args_list[0][1]['pair'] == 'ETH/USDT'
|
||||||
|
assert exchange.cancel_order.call_args_list[0][1]['params'] == {'stop': True}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user