fix: 持仓接口实时拉取并回写本地监控,修复有仓不显示
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+12
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user