Merge pull request #6385 from samgermain/bin-stop

This commit is contained in:
Matthias
2022-02-10 19:51:59 +01:00
committed by GitHub

View File

@@ -45,7 +45,9 @@ class Binance(Exchange):
:param side: "buy" or "sell" :param side: "buy" or "sell"
""" """
return order['type'] == 'stop_loss_limit' and ( ordertype = 'stop' if self.trading_mode == TradingMode.FUTURES else 'stop_loss_limit'
return order['type'] == ordertype and (
(side == "sell" and stop_loss > float(order['info']['stopPrice'])) or (side == "sell" and stop_loss > float(order['info']['stopPrice'])) or
(side == "buy" and stop_loss < float(order['info']['stopPrice'])) (side == "buy" and stop_loss < float(order['info']['stopPrice']))
) )
@@ -67,7 +69,7 @@ class Binance(Exchange):
else: else:
rate = stop_price * (2 - limit_price_pct) rate = stop_price * (2 - limit_price_pct)
ordertype = "stop_loss_limit" ordertype = 'stop' if self.trading_mode == TradingMode.FUTURES else 'stop_loss_limit'
stop_price = self.price_to_precision(pair, stop_price) stop_price = self.price_to_precision(pair, stop_price)