fix: 交易安全审计修复 — 补偿平仓、中控同步、滚仓/趋势防护

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-04 22:44:16 +08:00
parent df28e6dfb8
commit eb975b0133
11 changed files with 675 additions and 162 deletions
+1 -1
View File
@@ -868,7 +868,7 @@ def emergency_close_position(
for p in raw:
if not isinstance(p, dict):
continue
if (p.get("symbol") or "").strip() != sym:
if not symbols_match(sym, (p.get("symbol") or "").strip()):
continue
c = _position_contracts(p)
if abs(c) < 1e-12: