Thomas Kaul
14 hours ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
9 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
|
|
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. |
|
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
|
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
|
|
|
|
|
|
|
## Unreleased |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
- Removed the deprecated `activities` from the endpoint `GET api/v1/portfolio/holding/:dataSource/:symbol` |
|
|
|
|
|
|
|
## 2.229.0 - 2026-01-11 |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
@ -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 { |
|
|
|
|