OpenBB-finance/OpenBB · warning · EmptyDataError
No data found for the given query -> {query.model_dump()}
Error message
No data found for the given query -> {query.model_dump()} What it means
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.
Source
Thrown at openbb_platform/providers/fmp/openbb_fmp/models/company_filings.py:126
start_date = (
query.start_date
if query.start_date
else dateType.today() - timedelta(days=360)
)
url += f"&from={start_date}"
end_date = query.end_date if query.end_date else dateType.today()
url += f"&to={end_date}"
url += f"&page={query.page}&limit={query.limit}&apikey={api_key}"
return await get_data_many(url, **kwargs)
@staticmethod
def transform_data(
query: FMPCompanyFilingsQueryParams, data: list[dict], **kwargs: Any
) -> list[FMPCompanyFilingsData]:
"""Return the transformed data."""
if not data:
raise EmptyDataError(
f"No data found for the given query -> {query.model_dump()}"
)
return [FMPCompanyFilingsData.model_validate(d) for d in data]
View on GitHub (pinned to 3e071fcc2c)
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
Example fix
# before q = FMPCompanyFilingsQueryParams(symbol="NEWLY", start_date="2026-01-01", end_date="2026-01-02") # EmptyDataError: No data found for the given query # after q = FMPCompanyFilingsQueryParams(symbol="NEWLY", page=0) # default 360-day window
Defensive patterns
Strategy: try-catch
Validate before calling
from datetime import date
if end_date is not None:
assert start_date is None or start_date <= end_date, "date window inverted"
if page > 0:
pass # remember: any page past the last returns empty -> stop paginating Try / catch
from openbb_core.provider.abstract.errors import EmptyDataError
try:
filings = await FMPCompanyFilingsFetcher.transform_query(...)
except EmptyDataError:
filings = [] # no filings in window; widen dates or stop paginating Prevention
- 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
When it happens
Trigger: 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.
Common situations: Paginating past the last page; querying dormant shell companies; newly created tickers with no filings yet; date strings in non-YYYY-MM-DD formats.
Related errors
- The request was returned empty.
- No data was returned for the given query.
- No data returned for the given symbols.
- Either symbol or cik must be provided.
- Error serializing output for an extension-modified endpoint
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/87f9b2b65796c18a.
Report an issue: GitHub.