Improve behavior of okx rebuys when using stop on exchange

closes #8755
This commit is contained in:
Matthias
2023-06-10 16:29:43 +02:00
parent 4f15b30339
commit cfe88f06d2
2 changed files with 23 additions and 2 deletions

View File

@@ -499,7 +499,11 @@ def test__set_leverage_okx(mocker, default_conf):
assert api_mock.set_leverage.call_args_list[0][1]['params'] == {
'mgnMode': 'isolated',
'posSide': 'net'}
api_mock.set_leverage = MagicMock(side_effect=ccxt.NetworkError())
exchange._lev_prep('BTC/USDT:USDT', 3.2, 'buy')
api_mock.fetch_leverage.call_count == 1
api_mock.fetch_leverage = MagicMock(side_effect=ccxt.NetworkError())
ccxt_exceptionhandlers(
mocker,
default_conf,