set leverage more thorough tests
This commit is contained in:
@@ -156,8 +156,8 @@ class Binance(Exchange):
|
||||
def _set_leverage(
|
||||
self,
|
||||
leverage: float,
|
||||
pair: Optional[str],
|
||||
trading_mode: Optional[TradingMode]
|
||||
pair: Optional[str] = None,
|
||||
trading_mode: Optional[TradingMode] = None
|
||||
):
|
||||
"""
|
||||
Set's the leverage before making a trade, in order to not
|
||||
|
@@ -1605,8 +1605,8 @@ class Exchange:
|
||||
def _set_leverage(
|
||||
self,
|
||||
leverage: float,
|
||||
pair: Optional[str],
|
||||
trading_mode: Optional[TradingMode]
|
||||
pair: Optional[str] = None,
|
||||
trading_mode: Optional[TradingMode] = None
|
||||
):
|
||||
"""
|
||||
Set's the leverage before making a trade, in order to not
|
||||
|
@@ -175,8 +175,8 @@ class Kraken(Exchange):
|
||||
def _set_leverage(
|
||||
self,
|
||||
leverage: float,
|
||||
pair: Optional[str],
|
||||
trading_mode: Optional[TradingMode]
|
||||
pair: Optional[str] = None,
|
||||
trading_mode: Optional[TradingMode] = None
|
||||
):
|
||||
"""
|
||||
Kraken set's the leverage as an option in the order object, so we need to
|
||||
@@ -185,4 +185,5 @@ class Kraken(Exchange):
|
||||
if leverage > 1.0:
|
||||
self._params['leverage'] = leverage
|
||||
else:
|
||||
del self._params['leverage']
|
||||
if 'leverage' in self._params:
|
||||
del self._params['leverage']
|
||||
|
Reference in New Issue
Block a user