|
@ -79,10 +79,10 @@ export class PortfolioController { |
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, |
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, |
|
|
@Query('accounts') filterByAccounts?: string, |
|
|
@Query('accounts') filterByAccounts?: string, |
|
|
@Query('assetClasses') filterByAssetClasses?: string, |
|
|
@Query('assetClasses') filterByAssetClasses?: string, |
|
|
@Query('range') dateRange: DateRange = 'max', |
|
|
|
|
|
@Query('tags') filterByTags?: string, |
|
|
|
|
|
@Query('dataSource') filterByDataSource?: string, |
|
|
@Query('dataSource') filterByDataSource?: string, |
|
|
|
|
|
@Query('range') dateRange: DateRange = 'max', |
|
|
@Query('symbol') filterBySymbol?: string, |
|
|
@Query('symbol') filterBySymbol?: string, |
|
|
|
|
|
@Query('tags') filterByTags?: string, |
|
|
@Query('withMarkets') withMarketsParam = 'false' |
|
|
@Query('withMarkets') withMarketsParam = 'false' |
|
|
): Promise<PortfolioDetails & { hasError: boolean }> { |
|
|
): Promise<PortfolioDetails & { hasError: boolean }> { |
|
|
const withMarkets = withMarketsParam === 'true'; |
|
|
const withMarkets = withMarketsParam === 'true'; |
|
@ -97,9 +97,9 @@ export class PortfolioController { |
|
|
const filters = this.apiService.buildFiltersFromQueryParams({ |
|
|
const filters = this.apiService.buildFiltersFromQueryParams({ |
|
|
filterByAccounts, |
|
|
filterByAccounts, |
|
|
filterByAssetClasses, |
|
|
filterByAssetClasses, |
|
|
filterByTags, |
|
|
|
|
|
filterByDataSource, |
|
|
filterByDataSource, |
|
|
filterBySymbol |
|
|
filterBySymbol, |
|
|
|
|
|
filterByTags |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const { |
|
|
const { |
|
@ -297,18 +297,18 @@ export class PortfolioController { |
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, |
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, |
|
|
@Query('accounts') filterByAccounts?: string, |
|
|
@Query('accounts') filterByAccounts?: string, |
|
|
@Query('assetClasses') filterByAssetClasses?: string, |
|
|
@Query('assetClasses') filterByAssetClasses?: string, |
|
|
|
|
|
@Query('dataSource') filterByDataSource?: string, |
|
|
@Query('groupBy') groupBy?: GroupBy, |
|
|
@Query('groupBy') groupBy?: GroupBy, |
|
|
@Query('range') dateRange: DateRange = 'max', |
|
|
@Query('range') dateRange: DateRange = 'max', |
|
|
@Query('tags') filterByTags?: string, |
|
|
@Query('symbol') filterBySymbol?: string, |
|
|
@Query('dataSource') filterByDataSource?: string, |
|
|
@Query('tags') filterByTags?: string |
|
|
@Query('symbol') filterBySymbol?: string |
|
|
|
|
|
): Promise<PortfolioDividends> { |
|
|
): Promise<PortfolioDividends> { |
|
|
const filters = this.apiService.buildFiltersFromQueryParams({ |
|
|
const filters = this.apiService.buildFiltersFromQueryParams({ |
|
|
filterByAccounts, |
|
|
filterByAccounts, |
|
|
filterByAssetClasses, |
|
|
filterByAssetClasses, |
|
|
filterByTags, |
|
|
|
|
|
filterByDataSource, |
|
|
filterByDataSource, |
|
|
filterBySymbol |
|
|
filterBySymbol, |
|
|
|
|
|
filterByTags |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const impersonationUserId = |
|
|
const impersonationUserId = |
|
@ -369,21 +369,21 @@ export class PortfolioController { |
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, |
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, |
|
|
@Query('accounts') filterByAccounts?: string, |
|
|
@Query('accounts') filterByAccounts?: string, |
|
|
@Query('assetClasses') filterByAssetClasses?: string, |
|
|
@Query('assetClasses') filterByAssetClasses?: string, |
|
|
|
|
|
@Query('dataSource') filterByDataSource?: string, |
|
|
@Query('holdingType') filterByHoldingType?: string, |
|
|
@Query('holdingType') filterByHoldingType?: string, |
|
|
@Query('query') filterBySearchQuery?: string, |
|
|
@Query('query') filterBySearchQuery?: string, |
|
|
@Query('range') dateRange: DateRange = 'max', |
|
|
@Query('range') dateRange: DateRange = 'max', |
|
|
@Query('tags') filterByTags?: string, |
|
|
@Query('symbol') filterBySymbol?: string, |
|
|
@Query('dataSource') filterByDataSource?: string, |
|
|
@Query('tags') filterByTags?: string |
|
|
@Query('symbol') filterBySymbol?: string |
|
|
|
|
|
): Promise<PortfolioHoldingsResponse> { |
|
|
): Promise<PortfolioHoldingsResponse> { |
|
|
const filters = this.apiService.buildFiltersFromQueryParams({ |
|
|
const filters = this.apiService.buildFiltersFromQueryParams({ |
|
|
filterByAccounts, |
|
|
filterByAccounts, |
|
|
filterByAssetClasses, |
|
|
filterByAssetClasses, |
|
|
|
|
|
filterByDataSource, |
|
|
filterByHoldingType, |
|
|
filterByHoldingType, |
|
|
filterBySearchQuery, |
|
|
filterBySearchQuery, |
|
|
filterByTags, |
|
|
filterBySymbol, |
|
|
filterByDataSource, |
|
|
filterByTags |
|
|
filterBySymbol |
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const { holdings } = await this.portfolioService.getDetails({ |
|
|
const { holdings } = await this.portfolioService.getDetails({ |
|
@ -402,18 +402,18 @@ export class PortfolioController { |
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, |
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, |
|
|
@Query('accounts') filterByAccounts?: string, |
|
|
@Query('accounts') filterByAccounts?: string, |
|
|
@Query('assetClasses') filterByAssetClasses?: string, |
|
|
@Query('assetClasses') filterByAssetClasses?: string, |
|
|
|
|
|
@Query('dataSource') filterByDataSource?: string, |
|
|
@Query('groupBy') groupBy?: GroupBy, |
|
|
@Query('groupBy') groupBy?: GroupBy, |
|
|
@Query('range') dateRange: DateRange = 'max', |
|
|
@Query('range') dateRange: DateRange = 'max', |
|
|
@Query('tags') filterByTags?: string, |
|
|
@Query('symbol') filterBySymbol?: string, |
|
|
@Query('dataSource') filterByDataSource?: string, |
|
|
@Query('tags') filterByTags?: string |
|
|
@Query('symbol') filterBySymbol?: string |
|
|
|
|
|
): Promise<PortfolioInvestments> { |
|
|
): Promise<PortfolioInvestments> { |
|
|
const filters = this.apiService.buildFiltersFromQueryParams({ |
|
|
const filters = this.apiService.buildFiltersFromQueryParams({ |
|
|
filterByAccounts, |
|
|
filterByAccounts, |
|
|
filterByAssetClasses, |
|
|
filterByAssetClasses, |
|
|
filterByTags, |
|
|
|
|
|
filterByDataSource, |
|
|
filterByDataSource, |
|
|
filterBySymbol |
|
|
filterBySymbol, |
|
|
|
|
|
filterByTags |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
let { investments, streaks } = await this.portfolioService.getInvestments({ |
|
|
let { investments, streaks } = await this.portfolioService.getInvestments({ |
|
@ -473,10 +473,10 @@ export class PortfolioController { |
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, |
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, |
|
|
@Query('accounts') filterByAccounts?: string, |
|
|
@Query('accounts') filterByAccounts?: string, |
|
|
@Query('assetClasses') filterByAssetClasses?: string, |
|
|
@Query('assetClasses') filterByAssetClasses?: string, |
|
|
@Query('range') dateRange: DateRange = 'max', |
|
|
|
|
|
@Query('tags') filterByTags?: string, |
|
|
|
|
|
@Query('dataSource') filterByDataSource?: string, |
|
|
@Query('dataSource') filterByDataSource?: string, |
|
|
|
|
|
@Query('range') dateRange: DateRange = 'max', |
|
|
@Query('symbol') filterBySymbol?: string, |
|
|
@Query('symbol') filterBySymbol?: string, |
|
|
|
|
|
@Query('tags') filterByTags?: string, |
|
|
@Query('withExcludedAccounts') withExcludedAccountsParam = 'false' |
|
|
@Query('withExcludedAccounts') withExcludedAccountsParam = 'false' |
|
|
): Promise<PortfolioPerformanceResponse> { |
|
|
): Promise<PortfolioPerformanceResponse> { |
|
|
const withExcludedAccounts = withExcludedAccountsParam === 'true'; |
|
|
const withExcludedAccounts = withExcludedAccountsParam === 'true'; |
|
@ -484,9 +484,9 @@ export class PortfolioController { |
|
|
const filters = this.apiService.buildFiltersFromQueryParams({ |
|
|
const filters = this.apiService.buildFiltersFromQueryParams({ |
|
|
filterByAccounts, |
|
|
filterByAccounts, |
|
|
filterByAssetClasses, |
|
|
filterByAssetClasses, |
|
|
filterByTags, |
|
|
|
|
|
filterByDataSource, |
|
|
filterByDataSource, |
|
|
filterBySymbol |
|
|
filterBySymbol, |
|
|
|
|
|
filterByTags |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const performanceInformation = await this.portfolioService.getPerformance({ |
|
|
const performanceInformation = await this.portfolioService.getPerformance({ |
|
|