Browse Source

Convert market price back to currency of position

pull/248/head
Thomas 4 years ago
parent
commit
f99207b721
  1. 8
      apps/api/src/app/portfolio/portfolio.service.ts

8
apps/api/src/app/portfolio/portfolio.service.ts

@ -300,11 +300,17 @@ export class PortfolioService {
currency,
firstBuyDate,
investment,
marketPrice,
quantity,
transactionCount
} = position;
// Convert market price back to currency of position
const marketPrice = this.exchangeRateDataService.toCurrency(
position.marketPrice,
this.request.user.Settings.currency,
currency
);
const historicalData = await this.dataProviderService.getHistorical(
[aSymbol],
'day',

Loading…
Cancel
Save