From eb6177d2e56aebaed2b35e2811f5d944c22667c4 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Thu, 5 Feb 2026 19:40:41 +0100
Subject: [PATCH 1/9] Bugfix/fix exception when fetching top holdings in Yahoo
Finance service (#6279)
* Add missing guard
* Update changelog
---
CHANGELOG.md | 4 +++
.../yahoo-finance/yahoo-finance.service.ts | 34 +++++++++----------
2 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f64e6dc12..e4d88d75f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Upgraded `stripe` from version `20.1.0` to `20.3.0`
+### Fixed
+
+- Fixed an exception when fetching the top holdings for ETF and mutual fund assets from _Yahoo Finance_
+
## 2.235.0 - 2026-02-03
### Added
diff --git a/apps/api/src/services/data-provider/data-enhancer/yahoo-finance/yahoo-finance.service.ts b/apps/api/src/services/data-provider/data-enhancer/yahoo-finance/yahoo-finance.service.ts
index 97c875360..c83e35503 100644
--- a/apps/api/src/services/data-provider/data-enhancer/yahoo-finance/yahoo-finance.service.ts
+++ b/apps/api/src/services/data-provider/data-enhancer/yahoo-finance/yahoo-finance.service.ts
@@ -206,26 +206,26 @@ export class YahooFinanceDataEnhancerService implements DataEnhancerInterface {
);
if (['ETF', 'MUTUALFUND'].includes(assetSubClass)) {
- response.sectors = [];
-
- for (const sectorWeighting of assetProfile.topHoldings
- ?.sectorWeightings ?? []) {
- for (const [sector, weight] of Object.entries(sectorWeighting)) {
- response.sectors.push({
+ response.holdings =
+ assetProfile.topHoldings?.holdings?.map(
+ ({ holdingName, holdingPercent }) => {
+ return {
+ name: this.formatName({ longName: holdingName }),
+ weight: holdingPercent
+ };
+ }
+ ) ?? [];
+
+ response.sectors = (
+ assetProfile.topHoldings?.sectorWeightings ?? []
+ ).flatMap((sectorWeighting) => {
+ return Object.entries(sectorWeighting).map(([sector, weight]) => {
+ return {
name: this.parseSector(sector),
weight: weight as number
- });
- }
- }
-
- response.holdings = assetProfile.topHoldings.holdings.map(
- ({ holdingName, holdingPercent }) => {
- return {
- name: this.formatName({ longName: holdingName }),
- weight: holdingPercent
};
- }
- );
+ });
+ });
} else if (
assetSubClass === 'STOCK' &&
assetProfile.summaryProfile?.country
From 4ff372f0205366e1afdb36c8c8ade4dbb491878b Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Thu, 5 Feb 2026 20:24:04 +0100
Subject: [PATCH 2/9] Task/remove deprecated transaction count in get admin
endpoint (#6281)
* Remove deprecated transaction count
* Update changelog
---
CHANGELOG.md | 1 +
apps/api/src/app/admin/admin.service.ts | 1 -
libs/common/src/lib/interfaces/admin-data.interface.ts | 4 ----
3 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e4d88d75f..5e1c8b91a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- Removed the deprecated `transactionCount` in the endpoint `GET api/v1/admin`
- Upgraded `stripe` from version `20.1.0` to `20.3.0`
### Fixed
diff --git a/apps/api/src/app/admin/admin.service.ts b/apps/api/src/app/admin/admin.service.ts
index cd18eb239..2cc8bbfb8 100644
--- a/apps/api/src/app/admin/admin.service.ts
+++ b/apps/api/src/app/admin/admin.service.ts
@@ -186,7 +186,6 @@ export class AdminService {
dataProviders,
settings,
userCount,
- transactionCount: activitiesCount,
version: environment.version
};
}
diff --git a/libs/common/src/lib/interfaces/admin-data.interface.ts b/libs/common/src/lib/interfaces/admin-data.interface.ts
index 63588300c..dd25b516d 100644
--- a/libs/common/src/lib/interfaces/admin-data.interface.ts
+++ b/libs/common/src/lib/interfaces/admin-data.interface.ts
@@ -7,10 +7,6 @@ export interface AdminData {
useForExchangeRates: boolean;
})[];
settings: { [key: string]: boolean | object | string | string[] };
-
- /** @deprecated use activitiesCount instead */
- transactionCount: number;
-
userCount: number;
version: string;
}
From bf9f8d49e9301c676cb2195f8950812ad4b77e82 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Thu, 5 Feb 2026 20:28:23 +0100
Subject: [PATCH 3/9] Release 2.236.0 (#6282)
---
CHANGELOG.md | 2 +-
package-lock.json | 4 ++--
package.json | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5e1c8b91a..53c9b42d8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ 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
+## 2.236.0 - 2026-02-05
### Changed
diff --git a/package-lock.json b/package-lock.json
index 25cee635d..b90f9050f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "ghostfolio",
- "version": "2.235.0",
+ "version": "2.236.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ghostfolio",
- "version": "2.235.0",
+ "version": "2.236.0",
"hasInstallScript": true,
"license": "AGPL-3.0",
"dependencies": {
diff --git a/package.json b/package.json
index 9d7a37979..0aa520beb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ghostfolio",
- "version": "2.235.0",
+ "version": "2.236.0",
"homepage": "https://ghostfol.io",
"license": "AGPL-3.0",
"repository": "https://github.com/ghostfolio/ghostfolio",
From 5adacda88fd4010ef217409ab635eb6c2aed0625 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Fri, 6 Feb 2026 12:22:39 +0100
Subject: [PATCH 4/9] Task/remove deprecated session id from create stripe
checkout session response (#6280)
* Remove deprecated sessionId
---
apps/api/src/app/subscription/subscription.service.ts | 1 -
.../create-stripe-checkout-session-response.interface.ts | 3 ---
2 files changed, 4 deletions(-)
diff --git a/apps/api/src/app/subscription/subscription.service.ts b/apps/api/src/app/subscription/subscription.service.ts
index 2c0226937..689ee3e6a 100644
--- a/apps/api/src/app/subscription/subscription.service.ts
+++ b/apps/api/src/app/subscription/subscription.service.ts
@@ -100,7 +100,6 @@ export class SubscriptionService {
);
return {
- sessionId: session.id,
sessionUrl: session.url
};
}
diff --git a/libs/common/src/lib/interfaces/responses/create-stripe-checkout-session-response.interface.ts b/libs/common/src/lib/interfaces/responses/create-stripe-checkout-session-response.interface.ts
index 1222ac6e9..8ac1a8279 100644
--- a/libs/common/src/lib/interfaces/responses/create-stripe-checkout-session-response.interface.ts
+++ b/libs/common/src/lib/interfaces/responses/create-stripe-checkout-session-response.interface.ts
@@ -1,6 +1,3 @@
export interface CreateStripeCheckoutSessionResponse {
- /** @deprecated */
- sessionId: string;
-
sessionUrl: string;
}
From 348ee5de8d6e62f3271327090d9765633b4bae13 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 7 Feb 2026 14:04:10 +0100
Subject: [PATCH 5/9] Task/add missing transform data source interceptors in
market data controller (#6287)
* Add missing transform data source interceptors
---
.../app/endpoints/market-data/market-data.controller.ts | 7 ++++++-
.../src/app/endpoints/market-data/market-data.module.ts | 6 +++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/apps/api/src/app/endpoints/market-data/market-data.controller.ts b/apps/api/src/app/endpoints/market-data/market-data.controller.ts
index 987d34918..0dae82d2c 100644
--- a/apps/api/src/app/endpoints/market-data/market-data.controller.ts
+++ b/apps/api/src/app/endpoints/market-data/market-data.controller.ts
@@ -2,6 +2,8 @@ import { AdminService } from '@ghostfolio/api/app/admin/admin.service';
import { SymbolService } from '@ghostfolio/api/app/symbol/symbol.service';
import { HasPermission } from '@ghostfolio/api/decorators/has-permission.decorator';
import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard';
+import { TransformDataSourceInRequestInterceptor } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.interceptor';
+import { TransformDataSourceInResponseInterceptor } from '@ghostfolio/api/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor';
import { MarketDataService } from '@ghostfolio/api/services/market-data/market-data.service';
import { SymbolProfileService } from '@ghostfolio/api/services/symbol-profile/symbol-profile.service';
import {
@@ -28,7 +30,8 @@ import {
Param,
Post,
Query,
- UseGuards
+ UseGuards,
+ UseInterceptors
} from '@nestjs/common';
import { REQUEST } from '@nestjs/core';
import { AuthGuard } from '@nestjs/passport';
@@ -86,6 +89,8 @@ export class MarketDataController {
@Get(':dataSource/:symbol')
@UseGuards(AuthGuard('jwt'))
+ @UseInterceptors(TransformDataSourceInRequestInterceptor)
+ @UseInterceptors(TransformDataSourceInResponseInterceptor)
public async getMarketDataBySymbol(
@Param('dataSource') dataSource: DataSource,
@Param('symbol') symbol: string
diff --git a/apps/api/src/app/endpoints/market-data/market-data.module.ts b/apps/api/src/app/endpoints/market-data/market-data.module.ts
index a8b355de3..d5d64673d 100644
--- a/apps/api/src/app/endpoints/market-data/market-data.module.ts
+++ b/apps/api/src/app/endpoints/market-data/market-data.module.ts
@@ -1,5 +1,7 @@
import { AdminModule } from '@ghostfolio/api/app/admin/admin.module';
import { SymbolModule } from '@ghostfolio/api/app/symbol/symbol.module';
+import { TransformDataSourceInRequestModule } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.module';
+import { TransformDataSourceInResponseModule } from '@ghostfolio/api/interceptors/transform-data-source-in-response/transform-data-source-in-response.module';
import { MarketDataModule as MarketDataServiceModule } from '@ghostfolio/api/services/market-data/market-data.module';
import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module';
@@ -13,7 +15,9 @@ import { MarketDataController } from './market-data.controller';
AdminModule,
MarketDataServiceModule,
SymbolModule,
- SymbolProfileModule
+ SymbolProfileModule,
+ TransformDataSourceInRequestModule,
+ TransformDataSourceInResponseModule
]
})
export class MarketDataModule {}
From 63e75942a8e227dff18fe7667bc0cea30fab58e4 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 7 Feb 2026 14:51:09 +0100
Subject: [PATCH 6/9] Task/remove deprecated transaction count in portfolio
calculator and service (#6288)
* Remove deprecated transactionCount in portfolio calculator and service
* Update changelog
---
CHANGELOG.md | 6 +++
apps/api/src/app/account/account.service.ts | 6 +--
.../calculator/portfolio-calculator.ts | 7 +--
...tfolio-calculator-baln-buy-and-buy.spec.ts | 1 -
...aln-buy-and-sell-in-two-activities.spec.ts | 1 -
...folio-calculator-baln-buy-and-sell.spec.ts | 1 -
.../portfolio-calculator-baln-buy.spec.ts | 1 -
.../roai/portfolio-calculator-btceur.spec.ts | 1 -
...ator-btcusd-buy-and-sell-partially.spec.ts | 1 -
.../roai/portfolio-calculator-btcusd.spec.ts | 1 -
.../roai/portfolio-calculator-cash.spec.ts | 1 -
.../portfolio-calculator-googl-buy.spec.ts | 1 -
...-calculator-msft-buy-with-dividend.spec.ts | 3 +-
...ulator-novn-buy-and-sell-partially.spec.ts | 1 -
...folio-calculator-novn-buy-and-sell.spec.ts | 1 -
.../portfolio-calculator-valuable.spec.ts | 1 -
.../transaction-point-symbol.interface.ts | 3 --
.../src/app/portfolio/portfolio.service.ts | 8 ----
apps/api/src/helper/object.helper.spec.ts | 48 +++++++++----------
.../account-detail-dialog.component.ts | 6 +--
.../account-detail-dialog.html | 2 +-
.../portfolio-position.interface.ts | 4 --
.../responses/accounts-response.interface.ts | 3 --
.../src/lib/models/timeline-position.ts | 3 --
.../src/lib/types/account-with-value.type.ts | 4 --
.../accounts-table.component.html | 6 +--
.../accounts-table.component.stories.ts | 6 +--
libs/ui/src/lib/mocks/holdings.ts | 7 ---
28 files changed, 46 insertions(+), 88 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53c9b42d8..094266869 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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 `transactionCount` in the portfolio calculator and service
+
## 2.236.0 - 2026-02-05
### Changed
diff --git a/apps/api/src/app/account/account.service.ts b/apps/api/src/app/account/account.service.ts
index 398a89bb9..e1b01a6ed 100644
--- a/apps/api/src/app/account/account.service.ts
+++ b/apps/api/src/app/account/account.service.ts
@@ -150,15 +150,15 @@ export class AccountService {
});
return accounts.map((account) => {
- let transactionCount = 0;
+ let activitiesCount = 0;
for (const { isDraft } of account.activities) {
if (!isDraft) {
- transactionCount += 1;
+ activitiesCount += 1;
}
}
- const result = { ...account, transactionCount };
+ const result = { ...account, activitiesCount };
delete result.activities;
diff --git a/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts b/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts
index 9612ad1c4..2e58a4ef5 100644
--- a/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts
+++ b/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts
@@ -445,7 +445,6 @@ export abstract class PortfolioCalculator {
quantity: item.quantity,
symbol: item.symbol,
tags: item.tags,
- transactionCount: item.transactionCount,
valueInBaseCurrency: new Big(marketPriceInBaseCurrency).mul(
item.quantity
)
@@ -1005,8 +1004,7 @@ export abstract class PortfolioCalculator {
oldAccumulatedSymbol.feeInBaseCurrency.plus(feeInBaseCurrency),
includeInHoldings: oldAccumulatedSymbol.includeInHoldings,
quantity: newQuantity,
- tags: oldAccumulatedSymbol.tags.concat(tags),
- transactionCount: oldAccumulatedSymbol.transactionCount + 1
+ tags: oldAccumulatedSymbol.tags.concat(tags)
};
} else {
currentTransactionPointItem = {
@@ -1024,8 +1022,7 @@ export abstract class PortfolioCalculator {
dividend: new Big(0),
includeInHoldings: INVESTMENT_ACTIVITY_TYPES.includes(type),
investment: unitPrice.mul(quantity).mul(factor),
- quantity: quantity.mul(factor),
- transactionCount: 1
+ quantity: quantity.mul(factor)
};
}
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-buy.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-buy.spec.ts
index 7858d7546..52c8489dd 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-buy.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-buy.spec.ts
@@ -178,7 +178,6 @@ describe('PortfolioCalculator', () => {
timeWeightedInvestmentWithCurrencyEffect: new Big(
'474.93846153846153846154'
),
- transactionCount: 2,
valueInBaseCurrency: new Big('595.6')
}
],
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell-in-two-activities.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell-in-two-activities.spec.ts
index 8b40c7b70..3998b081d 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell-in-two-activities.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell-in-two-activities.spec.ts
@@ -192,7 +192,6 @@ describe('PortfolioCalculator', () => {
timeWeightedInvestmentWithCurrencyEffect: new Big(
'285.80000000000000396627'
),
- transactionCount: 3,
valueInBaseCurrency: new Big('0')
}
],
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell.spec.ts
index fc372f68f..acd0d0b2e 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell.spec.ts
@@ -176,7 +176,6 @@ describe('PortfolioCalculator', () => {
tags: [],
timeWeightedInvestment: new Big('285.8'),
timeWeightedInvestmentWithCurrencyEffect: new Big('285.8'),
- transactionCount: 2,
valueInBaseCurrency: new Big('0')
}
],
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy.spec.ts
index 926fae6dc..652e72db0 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy.spec.ts
@@ -172,7 +172,6 @@ describe('PortfolioCalculator', () => {
tags: [],
timeWeightedInvestment: new Big('273.2'),
timeWeightedInvestmentWithCurrencyEffect: new Big('273.2'),
- transactionCount: 1,
valueInBaseCurrency: new Big('297.8')
}
],
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btceur.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btceur.spec.ts
index b216438b8..055356325 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btceur.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btceur.spec.ts
@@ -227,7 +227,6 @@ describe('PortfolioCalculator', () => {
tags: [],
timeWeightedInvestment: new Big('44558.42'),
timeWeightedInvestmentWithCurrencyEffect: new Big('44558.42'),
- transactionCount: 1,
valueInBaseCurrency: new Big('43099.7')
}
],
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts
index 14cd4f217..a70cc2986 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts
@@ -194,7 +194,6 @@ describe('PortfolioCalculator', () => {
timeWeightedInvestmentWithCurrencyEffect: new Big(
'636.79389574611155533947'
),
- transactionCount: 2,
valueInBaseCurrency: new Big('13298.425356')
}
],
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd.spec.ts
index 066f33ea3..64882061f 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd.spec.ts
@@ -227,7 +227,6 @@ describe('PortfolioCalculator', () => {
tags: [],
timeWeightedInvestment: new Big('44558.42'),
timeWeightedInvestmentWithCurrencyEffect: new Big('44558.42'),
- transactionCount: 1,
valueInBaseCurrency: new Big('43099.7')
}
],
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-cash.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-cash.spec.ts
index bd8afddd7..a53ebcf05 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-cash.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-cash.spec.ts
@@ -276,7 +276,6 @@ describe('PortfolioCalculator', () => {
timeWeightedInvestmentWithCurrencyEffect: new Big(
'852.45231607629427792916'
),
- transactionCount: 2,
valueInBaseCurrency: new Big(1820)
});
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-googl-buy.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-googl-buy.spec.ts
index 28b44e159..9b48a1324 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-googl-buy.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-googl-buy.spec.ts
@@ -172,7 +172,6 @@ describe('PortfolioCalculator', () => {
tags: [],
timeWeightedInvestment: new Big('89.12').mul(0.8854),
timeWeightedInvestmentWithCurrencyEffect: new Big('82.329056'),
- transactionCount: 1,
valueInBaseCurrency: new Big('103.10483')
}
],
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-msft-buy-with-dividend.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-msft-buy-with-dividend.spec.ts
index 87ef9ed8b..b19adb642 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-msft-buy-with-dividend.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-msft-buy-with-dividend.spec.ts
@@ -162,8 +162,7 @@ describe('PortfolioCalculator', () => {
},
quantity: new Big('1'),
symbol: 'MSFT',
- tags: [],
- transactionCount: 2
+ tags: []
}
],
totalFeesWithCurrencyEffect: new Big('19'),
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell-partially.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell-partially.spec.ts
index 7a8dc010a..fecf17011 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell-partially.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell-partially.spec.ts
@@ -174,7 +174,6 @@ describe('PortfolioCalculator', () => {
timeWeightedInvestmentWithCurrencyEffect: new Big(
'145.10285714285714285714'
),
- transactionCount: 2,
valueInBaseCurrency: new Big('87.8')
}
],
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell.spec.ts
index 02a4e80d8..adbb5c3ff 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell.spec.ts
@@ -225,7 +225,6 @@ describe('PortfolioCalculator', () => {
tags: [],
timeWeightedInvestment: new Big('151.6'),
timeWeightedInvestmentWithCurrencyEffect: new Big('151.6'),
- transactionCount: 2,
valueInBaseCurrency: new Big('0')
}
],
diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-valuable.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-valuable.spec.ts
index 610a52c06..6fc94622f 100644
--- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-valuable.spec.ts
+++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-valuable.spec.ts
@@ -146,7 +146,6 @@ describe('PortfolioCalculator', () => {
tags: [],
timeWeightedInvestment: new Big('500000'),
timeWeightedInvestmentWithCurrencyEffect: new Big('500000'),
- transactionCount: 1,
valueInBaseCurrency: new Big('500000')
}
],
diff --git a/apps/api/src/app/portfolio/interfaces/transaction-point-symbol.interface.ts b/apps/api/src/app/portfolio/interfaces/transaction-point-symbol.interface.ts
index 7e7d741ea..7f3f54ff5 100644
--- a/apps/api/src/app/portfolio/interfaces/transaction-point-symbol.interface.ts
+++ b/apps/api/src/app/portfolio/interfaces/transaction-point-symbol.interface.ts
@@ -17,7 +17,4 @@ export interface TransactionPointSymbol {
skipErrors: boolean;
symbol: string;
tags?: Tag[];
-
- /** @deprecated use activitiesCount instead */
- transactionCount: number;
}
diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts
index 05df6a8fc..7be375473 100644
--- a/apps/api/src/app/portfolio/portfolio.service.ts
+++ b/apps/api/src/app/portfolio/portfolio.service.ts
@@ -233,7 +233,6 @@ export class PortfolioService {
account.currency,
userCurrency
),
- transactionCount: activitiesCount,
value: this.exchangeRateDataService.toCurrency(
valueInBaseCurrency,
userCurrency,
@@ -284,7 +283,6 @@ export class PortfolioService {
let totalDividendInBaseCurrency = new Big(0);
let totalInterestInBaseCurrency = new Big(0);
let totalValueInBaseCurrency = new Big(0);
- let transactionCount = 0;
for (const account of accounts) {
activitiesCount += account.activitiesCount;
@@ -301,8 +299,6 @@ export class PortfolioService {
totalValueInBaseCurrency = totalValueInBaseCurrency.plus(
account.valueInBaseCurrency
);
-
- transactionCount += account.transactionCount;
}
for (const account of accounts) {
@@ -317,7 +313,6 @@ export class PortfolioService {
return {
accounts,
activitiesCount,
- transactionCount,
totalBalanceInBaseCurrency: totalBalanceInBaseCurrency.toNumber(),
totalDividendInBaseCurrency: totalDividendInBaseCurrency.toNumber(),
totalInterestInBaseCurrency: totalInterestInBaseCurrency.toNumber(),
@@ -591,7 +586,6 @@ export class PortfolioService {
quantity,
symbol,
tags,
- transactionCount,
valueInBaseCurrency
} of positions) {
if (isFilteredByClosedHoldings === true) {
@@ -625,7 +619,6 @@ export class PortfolioService {
marketPrice,
symbol,
tags,
- transactionCount,
allocationInPercentage: filteredValueInBaseCurrency.eq(0)
? 0
: valueInBaseCurrency.div(filteredValueInBaseCurrency).toNumber(),
@@ -1696,7 +1689,6 @@ export class PortfolioService {
sectors: [],
symbol: currency,
tags: [],
- transactionCount: 0,
valueInBaseCurrency: balance
};
}
diff --git a/apps/api/src/helper/object.helper.spec.ts b/apps/api/src/helper/object.helper.spec.ts
index 5ddff164b..ed821390f 100644
--- a/apps/api/src/helper/object.helper.spec.ts
+++ b/apps/api/src/helper/object.helper.spec.ts
@@ -111,6 +111,7 @@ describe('redactAttributes', () => {
hasError: false,
holdings: {
'AAPL.US': {
+ activitiesCount: 1,
currency: 'USD',
markets: {
UNKNOWN: 0,
@@ -130,7 +131,6 @@ describe('redactAttributes', () => {
marketPrice: 220.79,
symbol: 'AAPL.US',
tags: [],
- transactionCount: 1,
allocationInPercentage: 0.044900865255793135,
assetClass: 'EQUITY',
assetSubClass: 'STOCK',
@@ -163,6 +163,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.0694356974830054
},
'ALV.DE': {
+ activitiesCount: 2,
currency: 'EUR',
markets: {
UNKNOWN: 0,
@@ -182,7 +183,6 @@ describe('redactAttributes', () => {
marketPrice: 296.5,
symbol: 'ALV.DE',
tags: [],
- transactionCount: 2,
allocationInPercentage: 0.026912563036519527,
assetClass: 'EQUITY',
assetSubClass: 'STOCK',
@@ -210,6 +210,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.04161818652826481
},
AMZN: {
+ activitiesCount: 1,
currency: 'USD',
markets: {
UNKNOWN: 0,
@@ -229,7 +230,6 @@ describe('redactAttributes', () => {
marketPrice: 187.99,
symbol: 'AMZN',
tags: [],
- transactionCount: 1,
allocationInPercentage: 0.07646101417126275,
assetClass: 'EQUITY',
assetSubClass: 'STOCK',
@@ -262,6 +262,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.11824101426541227
},
bitcoin: {
+ activitiesCount: 1,
currency: 'USD',
markets: {
UNKNOWN: 36985.0332704,
@@ -287,7 +288,6 @@ describe('redactAttributes', () => {
userId: null
}
],
- transactionCount: 1,
allocationInPercentage: 0.15042891393226654,
assetClass: 'LIQUIDITY',
assetSubClass: 'CRYPTOCURRENCY',
@@ -313,6 +313,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.232626620912395
},
BONDORA_GO_AND_GROW: {
+ activitiesCount: 5,
currency: 'EUR',
markets: {
UNKNOWN: 2231.644722160232,
@@ -338,7 +339,6 @@ describe('redactAttributes', () => {
userId: null
}
],
- transactionCount: 5,
allocationInPercentage: 0.009076749759365777,
assetClass: 'FIXED_INCOME',
assetSubClass: 'BOND',
@@ -364,6 +364,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.014036487867880205
},
FRANKLY95P: {
+ activitiesCount: 6,
currency: 'CHF',
markets: {
UNKNOWN: 0,
@@ -389,7 +390,6 @@ describe('redactAttributes', () => {
userId: null
}
],
- transactionCount: 6,
allocationInPercentage: 0.09095764645669335,
assetClass: 'EQUITY',
assetSubClass: 'ETF',
@@ -488,6 +488,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.14065892911313693
},
MSFT: {
+ activitiesCount: 1,
currency: 'USD',
markets: {
UNKNOWN: 0,
@@ -507,7 +508,6 @@ describe('redactAttributes', () => {
marketPrice: 428.02,
symbol: 'MSFT',
tags: [],
- transactionCount: 1,
allocationInPercentage: 0.05222646409742627,
assetClass: 'EQUITY',
assetSubClass: 'STOCK',
@@ -540,6 +540,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.08076416659271518
},
TSLA: {
+ activitiesCount: 1,
currency: 'USD',
markets: {
UNKNOWN: 0,
@@ -559,7 +560,6 @@ describe('redactAttributes', () => {
marketPrice: 260.46,
symbol: 'TSLA',
tags: [],
- transactionCount: 1,
allocationInPercentage: 0.1589050142378352,
assetClass: 'EQUITY',
assetSubClass: 'STOCK',
@@ -592,6 +592,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.2457342510950259
},
VTI: {
+ activitiesCount: 5,
currency: 'USD',
markets: {
UNKNOWN: 0,
@@ -611,7 +612,6 @@ describe('redactAttributes', () => {
marketPrice: 282.05,
symbol: 'VTI',
tags: [],
- transactionCount: 5,
allocationInPercentage: 0.057358979326040366,
assetClass: 'EQUITY',
assetSubClass: 'ETF',
@@ -764,6 +764,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.08870120238725339
},
'VWRL.SW': {
+ activitiesCount: 5,
currency: 'CHF',
markets: {
UNKNOWN: 0,
@@ -783,7 +784,6 @@ describe('redactAttributes', () => {
marketPrice: 117.62,
symbol: 'VWRL.SW',
tags: [],
- transactionCount: 5,
allocationInPercentage: 0.09386983901959013,
assetClass: 'EQUITY',
assetSubClass: 'ETF',
@@ -1172,6 +1172,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.145162408515095
},
'XDWD.DE': {
+ activitiesCount: 1,
currency: 'EUR',
markets: {
UNKNOWN: 0,
@@ -1191,7 +1192,6 @@ describe('redactAttributes', () => {
marketPrice: 105.72,
symbol: 'XDWD.DE',
tags: [],
- transactionCount: 1,
allocationInPercentage: 0.03598477442100562,
assetClass: 'EQUITY',
assetSubClass: 'ETF',
@@ -1450,6 +1450,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.055647656152211074
},
USD: {
+ activitiesCount: 0,
currency: 'USD',
allocationInPercentage: 0.20291717628620132,
assetClass: 'LIQUIDITY',
@@ -1472,7 +1473,6 @@ describe('redactAttributes', () => {
sectors: [],
symbol: 'USD',
tags: [],
- transactionCount: 0,
valueInBaseCurrency: 49890,
valueInPercentage: 0.3137956381563603
}
@@ -1615,6 +1615,7 @@ describe('redactAttributes', () => {
hasError: false,
holdings: {
'AAPL.US': {
+ activitiesCount: 1,
currency: 'USD',
markets: {
UNKNOWN: 0,
@@ -1634,7 +1635,6 @@ describe('redactAttributes', () => {
marketPrice: 220.79,
symbol: 'AAPL.US',
tags: [],
- transactionCount: 1,
allocationInPercentage: 0.044900865255793135,
assetClass: 'EQUITY',
assetSubClass: 'STOCK',
@@ -1667,6 +1667,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.0694356974830054
},
'ALV.DE': {
+ activitiesCount: 2,
currency: 'EUR',
markets: {
UNKNOWN: 0,
@@ -1686,7 +1687,6 @@ describe('redactAttributes', () => {
marketPrice: 296.5,
symbol: 'ALV.DE',
tags: [],
- transactionCount: 2,
allocationInPercentage: 0.026912563036519527,
assetClass: 'EQUITY',
assetSubClass: 'STOCK',
@@ -1714,6 +1714,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.04161818652826481
},
AMZN: {
+ activitiesCount: 1,
currency: 'USD',
markets: {
UNKNOWN: 0,
@@ -1733,7 +1734,6 @@ describe('redactAttributes', () => {
marketPrice: 187.99,
symbol: 'AMZN',
tags: [],
- transactionCount: 1,
allocationInPercentage: 0.07646101417126275,
assetClass: 'EQUITY',
assetSubClass: 'STOCK',
@@ -1766,6 +1766,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.11824101426541227
},
bitcoin: {
+ activitiesCount: 1,
currency: 'USD',
markets: {
UNKNOWN: 36985.0332704,
@@ -1791,7 +1792,6 @@ describe('redactAttributes', () => {
userId: null
}
],
- transactionCount: 1,
allocationInPercentage: 0.15042891393226654,
assetClass: 'LIQUIDITY',
assetSubClass: 'CRYPTOCURRENCY',
@@ -1817,6 +1817,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.232626620912395
},
BONDORA_GO_AND_GROW: {
+ activitiesCount: 5,
currency: 'EUR',
markets: {
UNKNOWN: 2231.644722160232,
@@ -1842,7 +1843,6 @@ describe('redactAttributes', () => {
userId: null
}
],
- transactionCount: 5,
allocationInPercentage: 0.009076749759365777,
assetClass: 'FIXED_INCOME',
assetSubClass: 'BOND',
@@ -1868,6 +1868,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.014036487867880205
},
FRANKLY95P: {
+ activitiesCount: 6,
currency: 'CHF',
markets: {
UNKNOWN: 0,
@@ -1893,7 +1894,6 @@ describe('redactAttributes', () => {
userId: null
}
],
- transactionCount: 6,
allocationInPercentage: 0.09095764645669335,
assetClass: 'EQUITY',
assetSubClass: 'ETF',
@@ -1972,6 +1972,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.14065892911313693
},
MSFT: {
+ activitiesCount: 1,
currency: 'USD',
markets: {
UNKNOWN: 0,
@@ -1991,7 +1992,6 @@ describe('redactAttributes', () => {
marketPrice: 428.02,
symbol: 'MSFT',
tags: [],
- transactionCount: 1,
allocationInPercentage: 0.05222646409742627,
assetClass: 'EQUITY',
assetSubClass: 'STOCK',
@@ -2024,6 +2024,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.08076416659271518
},
TSLA: {
+ activitiesCount: 1,
currency: 'USD',
markets: {
UNKNOWN: 0,
@@ -2043,7 +2044,6 @@ describe('redactAttributes', () => {
marketPrice: 260.46,
symbol: 'TSLA',
tags: [],
- transactionCount: 1,
allocationInPercentage: 0.1589050142378352,
assetClass: 'EQUITY',
assetSubClass: 'STOCK',
@@ -2076,6 +2076,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.2457342510950259
},
VTI: {
+ activitiesCount: 5,
currency: 'USD',
markets: {
UNKNOWN: 0,
@@ -2095,7 +2096,6 @@ describe('redactAttributes', () => {
marketPrice: 282.05,
symbol: 'VTI',
tags: [],
- transactionCount: 5,
allocationInPercentage: 0.057358979326040366,
assetClass: 'EQUITY',
assetSubClass: 'ETF',
@@ -2248,6 +2248,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.08870120238725339
},
'VWRL.SW': {
+ activitiesCount: 5,
currency: 'CHF',
markets: {
UNKNOWN: 0,
@@ -2267,7 +2268,6 @@ describe('redactAttributes', () => {
marketPrice: 117.62,
symbol: 'VWRL.SW',
tags: [],
- transactionCount: 5,
allocationInPercentage: 0.09386983901959013,
assetClass: 'EQUITY',
assetSubClass: 'ETF',
@@ -2648,6 +2648,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.145162408515095
},
'XDWD.DE': {
+ activitiesCount: 1,
currency: 'EUR',
markets: {
UNKNOWN: 0,
@@ -2667,7 +2668,6 @@ describe('redactAttributes', () => {
marketPrice: 105.72,
symbol: 'XDWD.DE',
tags: [],
- transactionCount: 1,
allocationInPercentage: 0.03598477442100562,
assetClass: 'EQUITY',
assetSubClass: 'ETF',
@@ -2926,6 +2926,7 @@ describe('redactAttributes', () => {
valueInPercentage: 0.055647656152211074
},
USD: {
+ activitiesCount: 0,
currency: 'USD',
allocationInPercentage: 0.20291717628620132,
assetClass: 'LIQUIDITY',
@@ -2948,7 +2949,6 @@ describe('redactAttributes', () => {
sectors: [],
symbol: 'USD',
tags: [],
- transactionCount: 0,
valueInBaseCurrency: null,
valueInPercentage: 0.3137956381563603
}
diff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts
index b40043cc8..380fb69cb 100644
--- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts
+++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts
@@ -80,6 +80,7 @@ import { AccountDetailDialogParams } from './interfaces/interfaces';
export class GfAccountDetailDialogComponent implements OnDestroy, OnInit {
public accountBalances: AccountBalancesResponse['balances'];
public activities: OrderWithAccount[];
+ public activitiesCount: number;
public balance: number;
public balancePrecision = 2;
public currency: string;
@@ -100,7 +101,6 @@ export class GfAccountDetailDialogComponent implements OnDestroy, OnInit {
public sortColumn = 'date';
public sortDirection: SortDirection = 'desc';
public totalItems: number;
- public transactionCount: number;
public user: User;
public valueInBaseCurrency: number;
@@ -215,16 +215,17 @@ export class GfAccountDetailDialogComponent implements OnDestroy, OnInit {
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe(
({
+ activitiesCount,
balance,
currency,
dividendInBaseCurrency,
interestInBaseCurrency,
name,
platform,
- transactionCount,
value,
valueInBaseCurrency
}) => {
+ this.activitiesCount = activitiesCount;
this.balance = balance;
if (
@@ -270,7 +271,6 @@ export class GfAccountDetailDialogComponent implements OnDestroy, OnInit {
this.name = name;
this.platformName = platform?.name ?? '-';
- this.transactionCount = transactionCount;
this.valueInBaseCurrency = valueInBaseCurrency;
this.changeDetectorRef.markForCheck();
diff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html
index 07ea17038..15dd8f13a 100644
--- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html
+++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html
@@ -82,7 +82,7 @@
>
- Activities
diff --git a/libs/common/src/lib/interfaces/portfolio-position.interface.ts b/libs/common/src/lib/interfaces/portfolio-position.interface.ts
index 67a2f3e77..620cc00e9 100644
--- a/libs/common/src/lib/interfaces/portfolio-position.interface.ts
+++ b/libs/common/src/lib/interfaces/portfolio-position.interface.ts
@@ -39,10 +39,6 @@ export interface PortfolioPosition {
sectors: Sector[];
symbol: string;
tags?: Tag[];
-
- /** @deprecated use activitiesCount instead */
- transactionCount: number;
-
type?: string;
url?: string;
valueInBaseCurrency?: number;
diff --git a/libs/common/src/lib/interfaces/responses/accounts-response.interface.ts b/libs/common/src/lib/interfaces/responses/accounts-response.interface.ts
index 1891b9cbb..90f1303e0 100644
--- a/libs/common/src/lib/interfaces/responses/accounts-response.interface.ts
+++ b/libs/common/src/lib/interfaces/responses/accounts-response.interface.ts
@@ -7,7 +7,4 @@ export interface AccountsResponse {
totalDividendInBaseCurrency: number;
totalInterestInBaseCurrency: number;
totalValueInBaseCurrency: number;
-
- /** @deprecated use activitiesCount instead */
- transactionCount: number;
}
diff --git a/libs/common/src/lib/models/timeline-position.ts b/libs/common/src/lib/models/timeline-position.ts
index 9cfb2df04..13f9001d5 100644
--- a/libs/common/src/lib/models/timeline-position.ts
+++ b/libs/common/src/lib/models/timeline-position.ts
@@ -93,9 +93,6 @@ export class TimelinePosition {
@Type(() => Big)
timeWeightedInvestmentWithCurrencyEffect: Big;
- /** @deprecated use activitiesCount instead */
- transactionCount: number;
-
@Transform(transformToBig, { toClassOnly: true })
@Type(() => Big)
valueInBaseCurrency: Big;
diff --git a/libs/common/src/lib/types/account-with-value.type.ts b/libs/common/src/lib/types/account-with-value.type.ts
index 7f5fe79ba..23cb14749 100644
--- a/libs/common/src/lib/types/account-with-value.type.ts
+++ b/libs/common/src/lib/types/account-with-value.type.ts
@@ -7,10 +7,6 @@ export type AccountWithValue = AccountModel & {
dividendInBaseCurrency: number;
interestInBaseCurrency: number;
platform?: Platform;
-
- /** @deprecated use activitiesCount instead */
- transactionCount: number;
-
value: number;
valueInBaseCurrency: number;
};
diff --git a/libs/ui/src/lib/accounts-table/accounts-table.component.html b/libs/ui/src/lib/accounts-table/accounts-table.component.html
index c9124820c..68ae78474 100644
--- a/libs/ui/src/lib/accounts-table/accounts-table.component.html
+++ b/libs/ui/src/lib/accounts-table/accounts-table.component.html
@@ -120,13 +120,13 @@
*matHeaderCellDef
class="justify-content-end px-1"
mat-header-cell
- mat-sort-header="transactionCount"
+ mat-sort-header="activitiesCount"
>
#
Activities
- {{ element.transactionCount }}
+ {{ element.activitiesCount }}
|
{{ activitiesCount }}
@@ -323,7 +323,7 @@
|