Remove unused argument from set_leverage
This commit is contained in:
parent
97c420b2df
commit
36c45fd14f
@ -2527,7 +2527,6 @@ class Exchange:
|
|||||||
self,
|
self,
|
||||||
leverage: float,
|
leverage: float,
|
||||||
pair: Optional[str] = None,
|
pair: Optional[str] = None,
|
||||||
trading_mode: Optional[TradingMode] = None,
|
|
||||||
accept_fail: bool = False,
|
accept_fail: bool = False,
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
|
@ -158,7 +158,6 @@ class Kraken(Exchange):
|
|||||||
self,
|
self,
|
||||||
leverage: float,
|
leverage: float,
|
||||||
pair: Optional[str] = None,
|
pair: Optional[str] = None,
|
||||||
trading_mode: Optional[TradingMode] = None,
|
|
||||||
accept_fail: bool = False,
|
accept_fail: bool = False,
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
|
@ -555,7 +555,6 @@ def test__set_leverage_binance(mocker, default_conf):
|
|||||||
"set_leverage",
|
"set_leverage",
|
||||||
pair="XRP/USDT",
|
pair="XRP/USDT",
|
||||||
leverage=5.0,
|
leverage=5.0,
|
||||||
trading_mode=TradingMode.FUTURES
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -3868,29 +3868,6 @@ def test_get_stake_amount_considering_leverage(
|
|||||||
stake_amount, leverage) == min_stake_with_lev
|
stake_amount, leverage) == min_stake_with_lev
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("exchange_name,trading_mode", [
|
|
||||||
("binance", TradingMode.FUTURES),
|
|
||||||
])
|
|
||||||
def test__set_leverage(mocker, default_conf, exchange_name, trading_mode):
|
|
||||||
|
|
||||||
api_mock = MagicMock()
|
|
||||||
api_mock.set_leverage = MagicMock()
|
|
||||||
type(api_mock).has = PropertyMock(return_value={'setLeverage': True})
|
|
||||||
default_conf['dry_run'] = False
|
|
||||||
|
|
||||||
ccxt_exceptionhandlers(
|
|
||||||
mocker,
|
|
||||||
default_conf,
|
|
||||||
api_mock,
|
|
||||||
exchange_name,
|
|
||||||
"_set_leverage",
|
|
||||||
"set_leverage",
|
|
||||||
pair="XRP/USDT",
|
|
||||||
leverage=5.0,
|
|
||||||
trading_mode=trading_mode
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("margin_mode", [
|
@pytest.mark.parametrize("margin_mode", [
|
||||||
(MarginMode.CROSS),
|
(MarginMode.CROSS),
|
||||||
(MarginMode.ISOLATED)
|
(MarginMode.ISOLATED)
|
||||||
|
Loading…
Reference in New Issue
Block a user