Browse Source
Task/remove deprecated activities from portfolio holding response (#6157)
* Remove deprecated activities
* Update changelog
pull/6160/merge
Thomas Kaul
1 day ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
4 additions and
21 deletions
-
CHANGELOG.md
-
apps/api/src/app/portfolio/portfolio.service.ts
-
libs/common/src/lib/interfaces/responses/portfolio-holding-response.interface.ts
-
libs/ui/src/lib/services/data.service.ts
|
|
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
### Changed |
|
|
|
|
|
|
|
- Removed the deprecated platforms from the info service |
|
|
|
- Removed the deprecated activities from the endpoint `GET api/v1/portfolio/holding/:dataSource/:symbol` |
|
|
|
|
|
|
|
## 2.230.0 - 2026-01-14 |
|
|
|
|
|
|
|
|
|
|
|
@ -920,7 +920,6 @@ export class PortfolioService { |
|
|
|
marketPriceMin, |
|
|
|
SymbolProfile, |
|
|
|
tags, |
|
|
|
activities: activitiesOfHolding, |
|
|
|
activitiesCount: transactionCount, |
|
|
|
averagePrice: averagePrice.toNumber(), |
|
|
|
dataProviderInfo: portfolioCalculator.getDataProviderInfos()?.[0], |
|
|
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
import { |
|
|
|
Activity, |
|
|
|
Benchmark, |
|
|
|
DataProviderInfo, |
|
|
|
EnhancedSymbolProfile, |
|
|
|
@ -9,9 +8,6 @@ import { |
|
|
|
import { Tag } from '@prisma/client'; |
|
|
|
|
|
|
|
export interface PortfolioHoldingResponse { |
|
|
|
/** @deprecated */ |
|
|
|
activities: Activity[]; |
|
|
|
|
|
|
|
activitiesCount: number; |
|
|
|
averagePrice: number; |
|
|
|
dataProviderInfo: DataProviderInfo; |
|
|
|
|
|
|
|
@ -424,22 +424,9 @@ export class DataService { |
|
|
|
dataSource: DataSource; |
|
|
|
symbol: string; |
|
|
|
}) { |
|
|
|
return this.http |
|
|
|
.get<PortfolioHoldingResponse>( |
|
|
|
`/api/v1/portfolio/holding/${dataSource}/${symbol}` |
|
|
|
) |
|
|
|
.pipe( |
|
|
|
map((data) => { |
|
|
|
if (data.activities) { |
|
|
|
for (const order of data.activities) { |
|
|
|
order.createdAt = parseISO(order.createdAt as unknown as string); |
|
|
|
order.date = parseISO(order.date as unknown as string); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return data; |
|
|
|
}) |
|
|
|
); |
|
|
|
return this.http.get<PortfolioHoldingResponse>( |
|
|
|
`/api/v1/portfolio/holding/${dataSource}/${symbol}` |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
public fetchInfo(): InfoItem { |
|
|
|
|