OpenBB-finance/OpenBB · error · OpenBBError

Symbol is a required field for FMP.

Error message

Symbol is a required field for FMP.

What it means

Error "Symbol is a required field for FMP." thrown in OpenBB-finance/OpenBB.

Source

Thrown at openbb_platform/providers/fmp/openbb_fmp/models/price_target_consensus.py:30

)
from openbb_core.provider.utils.errors import EmptyDataError
from pydantic import field_validator


class FMPPriceTargetConsensusQueryParams(PriceTargetConsensusQueryParams):
    """FMP Price Target Consensus Query.

    Source: https://site.financialmodelingprep.com/developer/docs#price-target-consensus
    """

    __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}}

    @field_validator("symbol", mode="before", check_fields=False)
    @classmethod
    def check_symbol(cls, value):
        """Check the symbol."""
        if not value:
            raise OpenBBError("Symbol is a required field for FMP.")
        return value


class FMPPriceTargetConsensusData(PriceTargetConsensusData):
    """FMP Price Target Consensus Data."""


class FMPPriceTargetConsensusFetcher(
    Fetcher[
        FMPPriceTargetConsensusQueryParams,
        list[FMPPriceTargetConsensusData],
    ]
):
    """FMP Price Target Consensus Fetcher."""

    @staticmethod
    def transform_query(params: dict[str, Any]) -> FMPPriceTargetConsensusQueryParams:
        """Transform the query params."""

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Provide the 'symbol' parameter with a valid ticker.
  2. Ensure the symbol string is non-empty before calling the endpoint.

When it happens

Trigger: Thrown at openbb_platform/providers/fmp/openbb_fmp/models/price_target_consensus.py:30 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14). Data as JSON: /api/errors/38420632fae536c0. Report an issue: GitHub.