Skip to content

Commit 23a4260

Browse files
committed
chore: simplify okx cancel stoploss method
1 parent 5919736 commit 23a4260

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

freqtrade/exchange/okx.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,14 +266,7 @@ def get_order_id_conditional(self, order: CcxtOrder) -> str:
266266
return order["id"]
267267

268268
def cancel_stoploss_order(self, order_id: str, pair: str, params: dict | None = None) -> dict:
269-
params1 = {"stop": True}
270-
# 'ordType': 'conditional'
271-
#
272-
return self.cancel_order(
273-
order_id=order_id,
274-
pair=pair,
275-
params=params1,
276-
)
269+
return self.cancel_order(order_id=order_id, pair=pair, params={"stop": True})
277270

278271
def _fetch_orders_emulate(self, pair: str, since_ms: int) -> list[CcxtOrder]:
279272
orders = []

0 commit comments

Comments
 (0)