Bug Description
req_pnl() streaming callback returns values that appear to be cumulative notional trade values (qty × price) rather than actual daily P&L.
Environment
- IBX version: 0.4.4
- IBKR paper account
- Python 3.12, Linux
Observed Behavior
The daily_pnl field in the pnl() callback jumps by the notional value of each trade rather than the actual P&L:
│ 10:06 │ BUY 171 ASTS @ $87.38 (notional=$14,941)
│ 10:20 │ BUY 72 BE @ $205.93 (notional=$14,827)
│ 11:43 │ BUY 73 BE @ $203.40 (notional=$14,848)
Pattern: each trade adds ~$14,800-$14,940 (the notional size) to the reported "daily P&L". This suggests the field contains cumulative trade value rather than profit/loss.
Expected Behavior
daily_pnl should reflect the actual daily profit & loss (realized + unrealized), matching IBKR's reqPnL() API spec.
Possible Cause
FIX tag mapping issue — market value or trade notional may be read as P&L field.
Bug Description
req_pnl() streaming callback returns values that appear to be cumulative notional trade values (qty × price) rather than actual daily P&L.
Environment
Observed Behavior
The daily_pnl field in the pnl() callback jumps by the notional value of each trade rather than the actual P&L:
│ 10:06 │ BUY 171 ASTS @ $87.38 (notional=$14,941)
│ 10:20 │ BUY 72 BE @ $205.93 (notional=$14,827)
│ 11:43 │ BUY 73 BE @ $203.40 (notional=$14,848)
Pattern: each trade adds ~$14,800-$14,940 (the notional size) to the reported "daily P&L". This suggests the field contains cumulative trade value rather than profit/loss.
Expected Behavior
daily_pnl should reflect the actual daily profit & loss (realized + unrealized), matching IBKR's reqPnL() API spec.
Possible Cause
FIX tag mapping issue — market value or trade notional may be read as P&L field.