Skip to content

[Feature] Refactor FMP#7217

Merged
deeleeramone merged 26 commits into
developfrom
feature/fmp-update
Oct 6, 2025
Merged

[Feature] Refactor FMP#7217
deeleeramone merged 26 commits into
developfrom
feature/fmp-update

Conversation

@deeleeramone

@deeleeramone deeleeramone commented Sep 23, 2025

Copy link
Copy Markdown
Contributor

This PR refactors all functions in the FMP provider extension to use the new FMP API. There are a lot of files touched, and it comes with breaking changes, some removals, and some additions. All FMP parameter and response models have been updated to reflect any schema changes made by FMP.

Some items removed:

  • obb.equity.fundamental.multiples: This is a duplicate of metrics, which is also used by other providers.
  • CompanyOverview: This was not used, and is redundant. The same as EquityProfile.
  • obb.etf.holdings_date: No longer necessary.
    • FMP's ETF Holdings do not have historical data, it was actually NPORT-P data.

Some items created:

  • obb.equity.fundamental.esg_score
  • obb.etf.nport_disclosure: Migrates sec, and the historical part offmp, from etf.holdings.
  • Adds FMP to:
    • obb.equity.discovery.gainers
    • obb.equity.discovery.losers
    • obb.equity.discover.active

Some parameter changes:

  • obb.equity.fundamental.metrics & .ratios:
    • For FMP, ttm parameter with choices: [include', 'exclude', 'only']. Default is only, and this setting overrides the limit and period parameters.
  • obb.news.world:
    • For FMP, adds topic parameter with choices: ['fmp_articles', 'general', 'press_releases', 'stocks', 'forex', 'crypto']
  • obb.equity.price.historical:
  • For FMP, adds adjustment with choices: ['splits_only', 'splits_and_dividends', 'unadjusted']

Additional changes:

  • Improve exception handling in openbb_core.provider.utils.amake_requests
  • Removed the test cleanup in conftest.py that was removing the static assets. This now fails with a message that can be ignored when running the tests locally.
  • Fixes the way models were being discovered by the tests to look at the function signature's response and check if it is OBBject. If so, use the model name that is attached to this.
  • Optimized FMP test cassettes to be smaller, and recaptured all.

@github-actions github-actions Bot added the enhancement Enhancement label Sep 23, 2025
@deeleeramone deeleeramone requested a review from piiq September 29, 2025 04:47

@piiq piiq left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this is a very big PR. I'm ±half way through it, and I thought that I leave the comment dump while the other half is still being read out.

The biggest question/concern/risk I want to ask about is the widespread changes to the standard models and their impact on downstream extensions. Will these changes be breaking? If yes will this only be released with the major version?

Comment thread openbb_platform/core/openbb_core/provider/standard_models/company_news.py Outdated
from pathlib import Path

import pytest
import pytest # noqa: F401

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rationale for this import to be here is the TIL moment for me.

@deeleeramone deeleeramone added this pull request to the merge queue Oct 6, 2025
Merged via the queue into develop with commit 2e3d8ef Oct 6, 2025
13 checks passed
@piiq piiq deleted the feature/fmp-update branch February 18, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants