revert期权历史仍按币展示盈亏,U 口径只用于统计结算。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1291,9 +1291,9 @@ class SimBroker:
|
||||
"closeAvgPx": str(close_px) if close_px is not None else "",
|
||||
"closeTotalPos": str(sheets),
|
||||
"openMaxPos": str(sheets),
|
||||
# 展示用 U 盈亏;币数量仍放 raw 供对账
|
||||
"realizedPnl": str(round(pnl_usdt, 4)) if pnl_usdt is not None else str(round(pnl, 8)),
|
||||
"pnl": str(round(pnl_usdt, 4)) if pnl_usdt is not None else str(round(pnl, 8)),
|
||||
# 期权历史展示币数量盈亏;U 口径只写 _sim_realized_pnl_usdt 供统计
|
||||
"realizedPnl": str(round(pnl, 8)),
|
||||
"pnl": str(round(pnl, 8)),
|
||||
"pnlRatio": str(round(pnl_ratio, 8)) if pnl_ratio is not None else "",
|
||||
"cTime": str(open_ms or ""),
|
||||
"uTime": str(close_ms or ""),
|
||||
@@ -1302,9 +1302,7 @@ class SimBroker:
|
||||
"stk": str(strike) if strike is not None else "",
|
||||
"_sim_premium_paid": paid,
|
||||
"_sim_premium_ccy": ccy,
|
||||
"_sim_realized_pnl_coin": pnl,
|
||||
"_sim_realized_pnl_usdt": pnl_usdt,
|
||||
"_sim_pnl_display_ccy": "USDT" if pnl_usdt is not None else ccy,
|
||||
}
|
||||
)
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user