Trades: an open position shows no close price or P&L
Vest's position history gives an open position a placeholder close price and a $0 P&L (290.25 on an NDX short at 29,538.96). Only a closed position keeps them now — in the parser, in the stored row (a placeholder already stored is cleared on the next read) and in the API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a03bfb5605
commit
016444239e
@@ -41,8 +41,8 @@ export async function GET(req: Request) {
|
||||
side: t.side,
|
||||
quantity: t.quantity,
|
||||
openPrice: t.openPrice,
|
||||
closePrice: t.closePrice,
|
||||
pnl: t.pnl,
|
||||
closePrice: open ? null : t.closePrice,
|
||||
pnl: open ? null : t.pnl,
|
||||
fee: t.fee,
|
||||
funding: t.funding,
|
||||
net,
|
||||
|
||||
Reference in New Issue
Block a user