Browse Source

Merge c587014152 into ae9588b1ac

pull/8062/merge
Thomas Kaul 3 days ago
committed by GitHub
parent
commit
716a1ce4ba
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 22
      apps/api/src/services/queues/data-gathering/data-gathering.service.spec.ts
  3. 2
      apps/api/src/services/queues/data-gathering/data-gathering.service.ts

1
CHANGELOG.md

@ -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

22
apps/api/src/services/queues/data-gathering/data-gathering.service.spec.ts

@ -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' })
})
);
});

2
apps/api/src/services/queues/data-gathering/data-gathering.service.ts

@ -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,

Loading…
Cancel
Save