Browse Source

Bugfix/respect includeIndices flag in search functionality of FMP service (#5746)

* Respect includeIndices in search()

* Update changelog
pull/5752/head
Thomas Kaul 6 days ago
committed by GitHub
parent
commit
058d7caacd
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 11
      apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts

4
CHANGELOG.md

@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Optimized the get quotes functionality by utilizing the asset profile resolutions in the _Financial Modeling Prep_ service - Optimized the get quotes functionality by utilizing the asset profile resolutions in the _Financial Modeling Prep_ service
- Extracted the footer to a component - Extracted the footer to a component
### Fixed
- Respected the include indices flag in the search functionality of the _Financial Modeling Prep_ service
## 2.208.0 - 2025-10-11 ## 2.208.0 - 2025-10-11
### Added ### Added

11
apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts

@ -454,6 +454,7 @@ export class FinancialModelingPrepService implements DataProviderInterface {
} }
public async search({ public async search({
includeIndices = false,
query, query,
requestTimeout = this.configurationService.get('REQUEST_TIMEOUT') requestTimeout = this.configurationService.get('REQUEST_TIMEOUT')
}: GetSearchParams): Promise<LookupResponse> { }: GetSearchParams): Promise<LookupResponse> {
@ -500,7 +501,15 @@ export class FinancialModelingPrepService implements DataProviderInterface {
} }
).then((res) => res.json()); ).then((res) => res.json());
items = result.map(({ currency, name, symbol }) => { items = result
.filter(({ symbol }) => {
if (includeIndices === false && symbol.startsWith('^')) {
return false;
}
return true;
})
.map(({ currency, name, symbol }) => {
return { return {
currency, currency,
symbol, symbol,

Loading…
Cancel
Save