diff --git a/CHANGELOG.md b/CHANGELOG.md index f153f2831..579536ef7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed an issue to get dividends in the _Financial Modeling Prep_ service +- Fixed an issue to get historical market data in the _Financial Modeling Prep_ service - Fixed an issue with serving _Storybook_ ## 2.144.0 - 2025-03-06 diff --git a/apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts b/apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts index 2d42fe21c..6a3d0d41f 100644 --- a/apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts +++ b/apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts @@ -244,7 +244,7 @@ export class FinancialModelingPrepService implements DataProviderInterface { [date: string]: IDataProviderHistoricalResponse; } = {}; - const { historical } = await fetch( + const { historical = [] } = await fetch( `${this.URL}/historical-price-full/stock_dividend/${symbol}?apikey=${this.apiKey}`, { signal: AbortSignal.timeout(requestTimeout) @@ -305,7 +305,7 @@ export class FinancialModelingPrepService implements DataProviderInterface { ? addYears(currentFrom, MAX_YEARS_PER_REQUEST) : to; - const { historical } = await fetch( + const { historical = [] } = await fetch( `${this.URL}/historical-price-full/${symbol}?apikey=${this.apiKey}&from=${format(currentFrom, DATE_FORMAT)}&to=${format(currentTo, DATE_FORMAT)}`, { signal: AbortSignal.timeout(requestTimeout)