Show open time and hold duration on position cards.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-29 15:41:56 +08:00
parent 195e63fb2e
commit 3df64aeb2d
4 changed files with 58 additions and 0 deletions
+2
View File
@@ -1039,6 +1039,7 @@ class Matcher:
)
strike = float(g["strike"]) if g and g["strike"] is not None else None
expiry_ymd = str(g["expiry_ymd"]) if g and g["expiry_ymd"] else None
open_at_ms = int(g["open_at_ms"]) if g and g["open_at_ms"] else None
expiry_ms = None
if expiry_ymd and len(expiry_ymd) == 6:
try:
@@ -1056,6 +1057,7 @@ class Matcher:
return {
"has_position": True,
"group_id": group_id,
"open_at_ms": open_at_ms,
"perp_side": perp_side,
"option_side": option_side,
"perp_inst_id": perp_inst_id,