Browse Source
Task/deprecate SymbolProfile in favor of assetProfile in get holding endpoint (#7054)
* Deprecate SymbolProfile in favor of assetProfile
* Update changelog
pull/7062/head
Thomas Kaul
5 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
30 additions and
0 deletions
-
CHANGELOG.md
-
apps/api/src/app/portfolio/portfolio.service.ts
-
apps/api/src/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor.ts
-
libs/common/src/lib/interfaces/responses/portfolio-holding-response.interface.ts
|
|
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
- Improved the account name display in the accounts table |
|
|
- Improved the account name display in the accounts table |
|
|
- Improved the name display in the activities table |
|
|
- Improved the name display in the activities table |
|
|
- Improved the user id display in the users table of the admin control panel |
|
|
- Improved the user id display in the users table of the admin control panel |
|
|
|
|
|
- Deprecated `SymbolProfile` in favor of `assetProfile` in the endpoint `GET api/v1/portfolio/holding/:dataSource/:symbol` |
|
|
- Improved the language localization for German (`de`) |
|
|
- Improved the language localization for German (`de`) |
|
|
- Upgraded `svgmap` from version `2.19.3` to `2.21.0` |
|
|
- Upgraded `svgmap` from version `2.19.3` to `2.21.0` |
|
|
|
|
|
|
|
|
|
|
|
@ -957,6 +957,18 @@ export class PortfolioService { |
|
|
marketPriceMin, |
|
|
marketPriceMin, |
|
|
SymbolProfile, |
|
|
SymbolProfile, |
|
|
tags, |
|
|
tags, |
|
|
|
|
|
assetProfile: { |
|
|
|
|
|
assetClass: SymbolProfile.assetClass, |
|
|
|
|
|
assetSubClass: SymbolProfile.assetSubClass, |
|
|
|
|
|
countries: SymbolProfile.countries, |
|
|
|
|
|
currency: SymbolProfile.currency, |
|
|
|
|
|
dataSource: SymbolProfile.dataSource, |
|
|
|
|
|
isin: SymbolProfile.isin, |
|
|
|
|
|
name: SymbolProfile.name, |
|
|
|
|
|
sectors: SymbolProfile.sectors, |
|
|
|
|
|
symbol: SymbolProfile.symbol, |
|
|
|
|
|
userId: SymbolProfile.userId |
|
|
|
|
|
}, |
|
|
averagePrice: averagePrice.toNumber(), |
|
|
averagePrice: averagePrice.toNumber(), |
|
|
dataProviderInfo: portfolioCalculator.getDataProviderInfos()?.[0], |
|
|
dataProviderInfo: portfolioCalculator.getDataProviderInfos()?.[0], |
|
|
dividendInBaseCurrency: dividendInBaseCurrency.toNumber(), |
|
|
dividendInBaseCurrency: dividendInBaseCurrency.toNumber(), |
|
|
|
|
|
@ -64,6 +64,7 @@ export class TransformDataSourceInResponseInterceptor< |
|
|
paths: [ |
|
|
paths: [ |
|
|
'activities[*].dataSource', |
|
|
'activities[*].dataSource', |
|
|
'activities[*].SymbolProfile.dataSource', |
|
|
'activities[*].SymbolProfile.dataSource', |
|
|
|
|
|
'assetProfile.dataSource', |
|
|
'benchmarks[*].dataSource', |
|
|
'benchmarks[*].dataSource', |
|
|
'errors[*].dataSource', |
|
|
'errors[*].dataSource', |
|
|
'fearAndGreedIndex.CRYPTOCURRENCIES.dataSource', |
|
|
'fearAndGreedIndex.CRYPTOCURRENCIES.dataSource', |
|
|
|
|
|
@ -9,6 +9,19 @@ import { Tag } from '@prisma/client'; |
|
|
|
|
|
|
|
|
export interface PortfolioHoldingResponse { |
|
|
export interface PortfolioHoldingResponse { |
|
|
activitiesCount: number; |
|
|
activitiesCount: number; |
|
|
|
|
|
assetProfile: Pick< |
|
|
|
|
|
EnhancedSymbolProfile, |
|
|
|
|
|
| 'assetClass' |
|
|
|
|
|
| 'assetSubClass' |
|
|
|
|
|
| 'countries' |
|
|
|
|
|
| 'currency' |
|
|
|
|
|
| 'dataSource' |
|
|
|
|
|
| 'isin' |
|
|
|
|
|
| 'name' |
|
|
|
|
|
| 'sectors' |
|
|
|
|
|
| 'symbol' |
|
|
|
|
|
| 'userId' |
|
|
|
|
|
>; |
|
|
averagePrice: number; |
|
|
averagePrice: number; |
|
|
dataProviderInfo: DataProviderInfo; |
|
|
dataProviderInfo: DataProviderInfo; |
|
|
dateOfFirstActivity: string; |
|
|
dateOfFirstActivity: string; |
|
|
@ -31,7 +44,10 @@ export interface PortfolioHoldingResponse { |
|
|
netPerformanceWithCurrencyEffect: number; |
|
|
netPerformanceWithCurrencyEffect: number; |
|
|
performances: Benchmark['performances']; |
|
|
performances: Benchmark['performances']; |
|
|
quantity: number; |
|
|
quantity: number; |
|
|
|
|
|
|
|
|
|
|
|
/* @deprecated */ |
|
|
SymbolProfile: EnhancedSymbolProfile; |
|
|
SymbolProfile: EnhancedSymbolProfile; |
|
|
|
|
|
|
|
|
tags: Tag[]; |
|
|
tags: Tag[]; |
|
|
value: number; |
|
|
value: number; |
|
|
} |
|
|
} |
|
|
|