From 3a1b74e5faf80eb51480bc84c9e23547fb57ac09 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 3 Jan 2026 21:57:35 +0100 Subject: [PATCH 1/2] Fix filtering by asset class --- apps/api/src/app/order/order.service.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/api/src/app/order/order.service.ts b/apps/api/src/app/order/order.service.ts index 57fe5d3b6..623ddecb7 100644 --- a/apps/api/src/app/order/order.service.ts +++ b/apps/api/src/app/order/order.service.ts @@ -335,14 +335,16 @@ export class OrderService { */ public async getCashOrders({ cashDetails, + filters = [], userCurrency, userId }: { cashDetails: CashDetails; + filters?: Filter[]; userCurrency: string; userId: string; }): Promise { - const activities: Activity[] = []; + let activities: Activity[] = []; for (const account of cashDetails.accounts) { const { balances } = await this.accountBalanceService.getAccountBalances({ @@ -422,6 +424,18 @@ export class OrderService { } } + activities = activities.filter(({ SymbolProfile }) => { + for (const { id, type } of filters) { + if (type === 'ASSET_CLASS') { + if (id !== SymbolProfile.assetClass) { + return false; + } + } + } + + return true; + }); + return { activities, count: activities.length @@ -755,6 +769,7 @@ export class OrderService { const cashOrders = await this.getCashOrders({ cashDetails, + filters, userCurrency, userId }); From 287e62ccd06478dd3851b94b6e18e1b4a8b45fe8 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 3 Jan 2026 21:57:58 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 124d03113..2e68c9344 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 - Deprecated `activities` in the endpoint `GET api/v1/portfolio/holding/:dataSource/:symbol` +### Fixed + +- Fixed the filtering by asset class in the endpoint `GET api/v1/portfolio/holdings` + ## 2.228.0 - 2026-01-03 ### Added