fix: 持仓接口实时拉取并回写本地监控,修复有仓不显示

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-25 14:14:21 +08:00
parent 040436e9cc
commit 367f32dd82
5 changed files with 122 additions and 33 deletions
+12 -2
View File
@@ -63,11 +63,21 @@ def _match_symbol(ctp_sym: str, ths: str) -> bool:
b = (ths or "").lower()
if a == b:
return True
if a and b and a.split(".")[0] == b.split(".")[0]:
return True
try:
vnpy_sym, _ = ths_to_vnpy_symbol(ths)
return a == vnpy_sym.lower()
if a == vnpy_sym.lower():
return True
except Exception:
return False
pass
try:
vnpy_sym, _ = ths_to_vnpy_symbol(ctp_sym)
if vnpy_sym.lower() == b.split(".")[0]:
return True
except Exception:
pass
return False
def _close_order_direction(hold_direction: str) -> str: