Thomas Kaul
3 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
23 additions and
2 deletions
-
CHANGELOG.md
-
apps/api/src/services/queues/data-gathering/data-gathering.service.spec.ts
-
apps/api/src/services/queues/data-gathering/data-gathering.service.ts
|
|
|
@ -124,6 +124,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
- Fixed the missing thousands separator of 4-digit numbers in certain locales |
|
|
|
- Fixed an issue where holdings without a market price have been valued at the unit price of a dividend, a fee, an interest or a liability |
|
|
|
- Fixed the check for today in the current rate service for instances running in a time zone behind UTC |
|
|
|
- Fixed the state of the market data in the historical market data gathering endpoint for a specific date |
|
|
|
|
|
|
|
## 3.79.0 - 2026-10-04 |
|
|
|
|
|
|
|
|
|
|
|
@ -222,7 +222,27 @@ describe('DataGatheringService', () => { |
|
|
|
expect(prismaService.marketData.upsert).toHaveBeenCalledWith( |
|
|
|
expect.objectContaining({ |
|
|
|
create: expect.objectContaining({ isCarriedForward: false }), |
|
|
|
update: { marketPrice: 100, isCarriedForward: false } |
|
|
|
update: { marketPrice: 100, isCarriedForward: false, state: 'CLOSE' } |
|
|
|
}) |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
it('sets the state to CLOSE on a previously intraday market price', async () => { |
|
|
|
dataProviderService.getHistoricalRaw.mockResolvedValue({ |
|
|
|
'YAHOO-AAPL': { |
|
|
|
'2026-08-22': { marketPrice: 100 } |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
await dataGatheringService.gatherSymbolForDate({ |
|
|
|
dataSource: 'YAHOO', |
|
|
|
date: parseDate('2026-08-22'), |
|
|
|
symbol: 'AAPL' |
|
|
|
}); |
|
|
|
|
|
|
|
expect(prismaService.marketData.upsert).toHaveBeenCalledWith( |
|
|
|
expect.objectContaining({ |
|
|
|
update: expect.objectContaining({ state: 'CLOSE' }) |
|
|
|
}) |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
@ -346,7 +346,7 @@ export class DataGatheringService { |
|
|
|
date: startOfUtcDate, |
|
|
|
isCarriedForward: false |
|
|
|
}, |
|
|
|
update: { marketPrice, isCarriedForward: false }, |
|
|
|
update: { marketPrice, isCarriedForward: false, state: 'CLOSE' }, |
|
|
|
where: { |
|
|
|
dataSource_symbol_date: { |
|
|
|
dataSource, |
|
|
|
|