{"record":{"id":"87f9b2b65796c18a","repo":"OpenBB-finance/OpenBB","slug":"no-data-found-for-the-given-query-query-model","errorCode":null,"errorMessage":"No data found for the given query -> {query.model_dump()}","messagePattern":"No data found for the given query -> (.+?)","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/fmp/openbb_fmp/models/company_filings.py","lineNumber":126,"sourceCode":"        start_date = (\n            query.start_date\n            if query.start_date\n            else dateType.today() - timedelta(days=360)\n        )\n        url += f\"&from={start_date}\"\n        end_date = query.end_date if query.end_date else dateType.today()\n        url += f\"&to={end_date}\"\n        url += f\"&page={query.page}&limit={query.limit}&apikey={api_key}\"\n\n        return await get_data_many(url, **kwargs)\n\n    @staticmethod\n    def transform_data(\n        query: FMPCompanyFilingsQueryParams, data: list[dict], **kwargs: Any\n    ) -> list[FMPCompanyFilingsData]:\n        \"\"\"Return the transformed data.\"\"\"\n        if not data:\n            raise EmptyDataError(\n                f\"No data found for the given query -> {query.model_dump()}\"\n            )\n        return [FMPCompanyFilingsData.model_validate(d) for d in data]\n","sourceCodeStart":108,"sourceCodeEnd":130,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/fmp/openbb_fmp/models/company_filings.py#L108-L130","documentation":"FMP company filings transform_data raises EmptyDataError including a dump of the full query when the fetched list is empty. The API call succeeded and returned no filings for the parameters (default window is the trailing 360 days when dates are omitted). The model_dump in the message makes misconfiguration obvious.","triggerScenarios":"A symbol/CIK with no SEC filings in the requested window; page beyond available results; start_date after end_date; a CIK formatted with dashes or wrong padding so FMP matches nothing.","commonSituations":"Paginating past the last page; querying dormant shell companies; newly created tickers with no filings yet; date strings in non-YYYY-MM-DD formats.","solutions":["Read the dumped query in the message and verify symbol/cik and the date window","Widen start_date/end_date (or omit them to get the default 360-day window)","Check the page parameter is within range (start at 0 and stop when empty)","Pass CIK as a zero-padded numeric string without dashes"],"exampleFix":"# before\nq = FMPCompanyFilingsQueryParams(symbol=\"NEWLY\", start_date=\"2026-01-01\", end_date=\"2026-01-02\")\n# EmptyDataError: No data found for the given query\n\n# after\nq = FMPCompanyFilingsQueryParams(symbol=\"NEWLY\", page=0)  # default 360-day window","handlingStrategy":"try-catch","validationCode":"from datetime import date\n\nif end_date is not None:\n    assert start_date is None or start_date <= end_date, \"date window inverted\"\nif page > 0:\n    pass  # remember: any page past the last returns empty -> stop paginating","typeGuard":null,"tryCatchPattern":"from openbb_core.provider.abstract.errors import EmptyDataError\n\ntry:\n    filings = await FMPCompanyFilingsFetcher.transform_query(...)\nexcept EmptyDataError:\n    filings = []  # no filings in window; widen dates or stop paginating","preventionTips":["Stop paginating on the first EmptyDataError rather than requesting further pages","Widen or omit start/end dates for dormant companies","Format CIKs as zero-padded strings without dashes"],"tags":["openbb","fmp","empty-data","filings","date-range"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}