Update binance stoploss to use correct stop order for futures
This commit is contained in:
@@ -22,6 +22,7 @@ class Binance(Exchange):
|
||||
_ft_has: Dict = {
|
||||
"stoploss_on_exchange": True,
|
||||
"stoploss_order_types": {"limit": "stop_loss_limit"},
|
||||
"stoploss_order_types_futures": {"limit": "stop"},
|
||||
"order_time_in_force": ['gtc', 'fok', 'ioc'],
|
||||
"time_in_force_parameter": "timeInForce",
|
||||
"ohlcv_candle_limit": 1000,
|
||||
|
@@ -1011,6 +1011,11 @@ class Exchange:
|
||||
def _get_stop_order_type(self, user_order_type) -> Tuple[str, str]:
|
||||
|
||||
available_order_Types: Dict[str, str] = self._ft_has["stoploss_order_types"]
|
||||
if self.trading_mode == TradingMode.FUTURES:
|
||||
# Optionally use different order type for stop order
|
||||
available_order_Types = self._ft_has.get('stoploss_order_types_futures',
|
||||
self._ft_has["stoploss_order_types"])
|
||||
|
||||
if user_order_type in available_order_Types.keys():
|
||||
ordertype = available_order_Types[user_order_type]
|
||||
else:
|
||||
|
Reference in New Issue
Block a user