|
@ -317,7 +317,7 @@ export class PortfolioController { |
|
|
const { holdings } = await this.portfolioService.getDetails( |
|
|
const { holdings } = await this.portfolioService.getDetails( |
|
|
access.userId, |
|
|
access.userId, |
|
|
access.userId, |
|
|
access.userId, |
|
|
'1d', |
|
|
'max', |
|
|
[{ id: 'EQUITY', type: 'ASSET_CLASS' }] |
|
|
[{ id: 'EQUITY', type: 'ASSET_CLASS' }] |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
@ -338,12 +338,14 @@ export class PortfolioController { |
|
|
|
|
|
|
|
|
for (const [symbol, portfolioPosition] of Object.entries(holdings)) { |
|
|
for (const [symbol, portfolioPosition] of Object.entries(holdings)) { |
|
|
portfolioPublicDetails.holdings[symbol] = { |
|
|
portfolioPublicDetails.holdings[symbol] = { |
|
|
allocationCurrent: portfolioPosition.allocationCurrent, |
|
|
allocationCurrent: portfolioPosition.value / totalValue, |
|
|
countries: hasDetails ? portfolioPosition.countries : [], |
|
|
countries: hasDetails ? portfolioPosition.countries : [], |
|
|
currency: portfolioPosition.currency, |
|
|
currency: portfolioPosition.currency, |
|
|
markets: portfolioPosition.markets, |
|
|
markets: portfolioPosition.markets, |
|
|
name: portfolioPosition.name, |
|
|
name: portfolioPosition.name, |
|
|
|
|
|
netPerformancePercent: portfolioPosition.netPerformancePercent, |
|
|
sectors: hasDetails ? portfolioPosition.sectors : [], |
|
|
sectors: hasDetails ? portfolioPosition.sectors : [], |
|
|
|
|
|
symbol: portfolioPosition.symbol, |
|
|
value: portfolioPosition.value / totalValue |
|
|
value: portfolioPosition.value / totalValue |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|