Browse Source
Bugfix/respect includeIndices flag in search functionality of FMP service (#5746)
* Respect includeIndices in search()
* Update changelog
pull/5741/merge
Thomas Kaul
5 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
24 additions and
11 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts
|
|
@ -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 |
|
|
|
- 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 |
|
|
|
|
|
|
|
### Added |
|
|
|
|
|
@ -454,6 +454,7 @@ export class FinancialModelingPrepService implements DataProviderInterface { |
|
|
|
} |
|
|
|
|
|
|
|
public async search({ |
|
|
|
includeIndices = false, |
|
|
|
query, |
|
|
|
requestTimeout = this.configurationService.get('REQUEST_TIMEOUT') |
|
|
|
}: GetSearchParams): Promise<LookupResponse> { |
|
|
@ -500,7 +501,15 @@ export class FinancialModelingPrepService implements DataProviderInterface { |
|
|
|
} |
|
|
|
).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 { |
|
|
|
currency, |
|
|
|
symbol, |
|
|
|