Browse Source

Bugfix/fix fetching dividend and historical market data in Financial Modeling Prep service (#4416)

* Add default values

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

2
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

4
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)

Loading…
Cancel
Save