|
@ -376,7 +376,7 @@ export class PortfolioService { |
|
|
currency: userCurrency |
|
|
currency: userCurrency |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const { currentValueInBaseCurrency, hasErrors, positions } = |
|
|
const { createdAt, currentValueInBaseCurrency, hasErrors, positions } = |
|
|
await portfolioCalculator.getSnapshot(); |
|
|
await portfolioCalculator.getSnapshot(); |
|
|
|
|
|
|
|
|
const cashDetails = await this.accountService.getCashDetails({ |
|
|
const cashDetails = await this.accountService.getCashDetails({ |
|
@ -617,6 +617,7 @@ export class PortfolioService { |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
accounts, |
|
|
accounts, |
|
|
|
|
|
createdAt, |
|
|
hasErrors, |
|
|
hasErrors, |
|
|
holdings, |
|
|
holdings, |
|
|
markets, |
|
|
markets, |
|
@ -1100,7 +1101,6 @@ export class PortfolioService { |
|
|
firstOrderDate: undefined, |
|
|
firstOrderDate: undefined, |
|
|
hasErrors: false, |
|
|
hasErrors: false, |
|
|
performance: { |
|
|
performance: { |
|
|
createdAt: new Date(), |
|
|
|
|
|
currentNetWorth: 0, |
|
|
currentNetWorth: 0, |
|
|
currentValueInBaseCurrency: 0, |
|
|
currentValueInBaseCurrency: 0, |
|
|
netPerformance: 0, |
|
|
netPerformance: 0, |
|
@ -1121,7 +1121,7 @@ export class PortfolioService { |
|
|
currency: userCurrency |
|
|
currency: userCurrency |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const { createdAt, errors, hasErrors, historicalData } = |
|
|
const { errors, hasErrors, historicalData } = |
|
|
await portfolioCalculator.getSnapshot(); |
|
|
await portfolioCalculator.getSnapshot(); |
|
|
|
|
|
|
|
|
const { endDate, startDate } = getIntervalFromDateRange(dateRange); |
|
|
const { endDate, startDate } = getIntervalFromDateRange(dateRange); |
|
@ -1155,7 +1155,6 @@ export class PortfolioService { |
|
|
hasErrors, |
|
|
hasErrors, |
|
|
firstOrderDate: parseDate(historicalData[0]?.date), |
|
|
firstOrderDate: parseDate(historicalData[0]?.date), |
|
|
performance: { |
|
|
performance: { |
|
|
createdAt, |
|
|
|
|
|
netPerformance, |
|
|
netPerformance, |
|
|
netPerformanceWithCurrencyEffect, |
|
|
netPerformanceWithCurrencyEffect, |
|
|
totalInvestment, |
|
|
totalInvestment, |
|
@ -1811,7 +1810,7 @@ export class PortfolioService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const { createdAt, currentValueInBaseCurrency, totalInvestment } = |
|
|
const { currentValueInBaseCurrency, totalInvestment } = |
|
|
await portfolioCalculator.getSnapshot(); |
|
|
await portfolioCalculator.getSnapshot(); |
|
|
|
|
|
|
|
|
const { performance } = await this.getPerformance({ |
|
|
const { performance } = await this.getPerformance({ |
|
@ -1916,7 +1915,6 @@ export class PortfolioService { |
|
|
})?.toNumber(); |
|
|
})?.toNumber(); |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
createdAt, |
|
|
|
|
|
annualizedPerformancePercent, |
|
|
annualizedPerformancePercent, |
|
|
annualizedPerformancePercentWithCurrencyEffect, |
|
|
annualizedPerformancePercentWithCurrencyEffect, |
|
|
cash, |
|
|
cash, |
|
|