修复趋势回调止盈误显与行情区成交量被裁切的问题

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-02 13:45:19 +08:00
parent 21ef97cbdb
commit 01d26e9833
5 changed files with 245 additions and 54 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ def _okx_normalize_orders(raw: dict, channel: str) -> list[dict[str, Any]]:
info = {}
sl_trig = _coerce_float(info.get("slTriggerPx"), raw.get("stopLossPrice"))
tp_trig = _coerce_float(info.get("tpTriggerPx"), raw.get("takeProfitPrice"))
if sl_trig is None or tp_trig is None:
if sl_trig is None or tp_trig is None or sl_trig == tp_trig:
return [n]
base_id = n["id"]
rows: list[dict[str, Any]] = []