diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 6ce441907..b13f4b88b 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -158,8 +158,8 @@ export class PortfolioService { return { date: format(parseISO(portfolioItem.date), 'yyyy-MM-dd'), grossPerformancePercent: portfolioItem.grossPerformancePercent, - marketPrice: portfolioItem.value || null, - value: portfolioItem.value || null + marketPrice: portfolioItem.value ?? null, + value: portfolioItem.value - portfolioItem.investment ?? null }; }); }