修复币本位买盘残档误判:内在价值按币报价(点差/指数)计算。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-20 17:21:49 +08:00
parent 1bb7f9b0ba
commit e39dbd47c5
3 changed files with 73 additions and 8 deletions
+7 -1
View File
@@ -58,7 +58,13 @@ def _pos_close_refs(ex: Any, pos: dict[str, Any], quote: dict[str, Any] | None =
if strike is None:
strike = ps
idx = _safe_float(pos.get("idxPx")) or _safe_float((quote or {}).get("index_px"))
return close_ref_prices(mark_px=mark, opt_type=str(opt_type or ""), strike=strike, index_px=idx)
return close_ref_prices(
mark_px=mark,
opt_type=str(opt_type or ""),
strike=strike,
index_px=idx,
inst_id=inst_id,
)
def _avail_sheets(pos: dict[str, Any]) -> int: