Simplify stoploss behavior by combining more commonalities

This commit is contained in:
Matthias
2022-10-26 07:14:33 +02:00
parent 6e0ca058f4
commit 255f38537e
4 changed files with 5 additions and 26 deletions

View File

@@ -23,19 +23,6 @@ class Huobi(Exchange):
"l2_limit_range_required": False,
}
def stoploss_adjust(self, stop_loss: float, order: Dict, side: str) -> bool:
"""
Verify stop_loss against stoploss-order value (limit or price)
Returns True if adjustment is necessary.
"""
return (
order.get('stopPrice', None) is None
or (
order['type'] == 'stop'
and stop_loss > float(order['stopPrice'])
)
)
def _get_stop_params(self, side: BuySell, ordertype: str, stop_price: float) -> Dict:
params = self._params.copy()