Add stoploss tests for kucoin

This commit is contained in:
Matthias
2022-02-24 07:08:15 +01:00
parent 020729cf50
commit 0749199097
3 changed files with 124 additions and 4 deletions

View File

@@ -33,7 +33,7 @@ class Kucoin(Exchange):
Returns True if adjustment is necessary.
"""
# TODO: since kucoin uses Limit orders, changes to models will be required.
return order['info']['stop'] is not None and stop_loss > float(order['stopPrice'])
return order['info'].get('stop') is not None and stop_loss > float(order['stopPrice'])
def _get_stop_params(self, ordertype: str, stop_price: float) -> Dict: