Browse Source
Feature/skip derived currencies in get quotes of data provider service (#3610)
* Skip derived currencies
* Update changelog
pull/3615/head
Thomas Kaul
6 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
16 additions and
5 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/data-provider.service.ts
|
|
@ -13,8 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
- Improved the handling of the numerical precision in the value component |
|
|
|
- Improved the account selector of the create or update activity dialog |
|
|
|
- Improved the handling of the numerical precision in the value component |
|
|
|
- Skipped derived currencies in the get quotes functionality of the data provider service |
|
|
|
- Improved the language localization for Spanish (`es`) |
|
|
|
- Upgraded `angular` from version `18.0.4` to `18.1.1` |
|
|
|
- Upgraded `Nx` from version `19.4.3` to `19.5.1` |
|
|
|
|
|
@ -14,7 +14,12 @@ import { |
|
|
|
DERIVED_CURRENCIES, |
|
|
|
PROPERTY_DATA_SOURCE_MAPPING |
|
|
|
} from '@ghostfolio/common/config'; |
|
|
|
import { DATE_FORMAT, getStartOfUtcDate } from '@ghostfolio/common/helper'; |
|
|
|
import { |
|
|
|
DATE_FORMAT, |
|
|
|
getCurrencyFromSymbol, |
|
|
|
getStartOfUtcDate, |
|
|
|
isDerivedCurrency |
|
|
|
} from '@ghostfolio/common/helper'; |
|
|
|
import { UniqueAsset } from '@ghostfolio/common/interfaces'; |
|
|
|
import type { Granularity, UserWithSettings } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
@ -423,13 +428,18 @@ export class DataProviderService { |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
const symbols = dataGatheringItems.map((dataGatheringItem) => { |
|
|
|
return dataGatheringItem.symbol; |
|
|
|
}); |
|
|
|
const symbols = dataGatheringItems |
|
|
|
.filter(({ symbol }) => { |
|
|
|
return !isDerivedCurrency(getCurrencyFromSymbol(symbol)); |
|
|
|
}) |
|
|
|
.map(({ symbol }) => { |
|
|
|
return symbol; |
|
|
|
}); |
|
|
|
|
|
|
|
const maximumNumberOfSymbolsPerRequest = |
|
|
|
dataProvider.getMaxNumberOfSymbolsPerRequest?.() ?? |
|
|
|
Number.MAX_SAFE_INTEGER; |
|
|
|
|
|
|
|
for ( |
|
|
|
let i = 0; |
|
|
|
i < symbols.length; |
|
|
|