Align options realtime PnL with bid-net and show totals in stats.
Header float PnL now uses bid recycle minus premium like position cards. Stats adds realized/open/total net PnL. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1161,7 +1161,11 @@ def resolve_option_close_from_history(
|
||||
|
||||
|
||||
def fetch_options_unrealized_pnl_usdc(ex: ccxt.okx) -> float | None:
|
||||
"""期权持仓未实现盈亏合计(USDC,统计口径与 USDT 1:1)."""
|
||||
"""
|
||||
期权浮盈合计(USDC≈U).
|
||||
优先返回交易所标记价 upl;实例顶栏应改用
|
||||
`options_positions_lib.sum_options_net_pnl_usdc`(买一净盈亏)以与持仓卡一致.
|
||||
"""
|
||||
positions = fetch_option_positions(ex)
|
||||
if positions is None:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user