Thomas Kaul
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
20 additions and
1 deletions
-
CHANGELOG.md
-
apps/api/src/app/order/order.service.ts
|
|
|
@ -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 |
|
|
|
|
|
|
|
@ -335,14 +335,16 @@ export class OrderService { |
|
|
|
*/ |
|
|
|
public async getCashOrders({ |
|
|
|
cashDetails, |
|
|
|
filters = [], |
|
|
|
userCurrency, |
|
|
|
userId |
|
|
|
}: { |
|
|
|
cashDetails: CashDetails; |
|
|
|
filters?: Filter[]; |
|
|
|
userCurrency: string; |
|
|
|
userId: string; |
|
|
|
}): Promise<ActivitiesResponse> { |
|
|
|
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 |
|
|
|
}); |
|
|
|
|