OpenBB-finance/OpenBB · warning · EmptyDataError
No results found. Try adjusting the query parameters.
Error message
No results found. Try adjusting the query parameters.
What it means
Raised as EmptyDataError by FederalReserveFederalFundsRateFetcher.aextract_data when the NY Fed markets API (/api/rates/unsecured/effr/search.json) returns no 'refRates' entries for the requested start/end dates. OpenBB surfaces this as the standard 'No results found. Try adjusting the query parameters.' message.
Source
Thrown at openbb_platform/providers/federal_reserve/openbb_federal_reserve/models/federal_funds_rate.py:125
async def aextract_data(
query: FederalReserveFederalFundsRateQueryParams,
credentials: dict[str, str] | None,
**kwargs: Any,
) -> list[dict]:
"""Extract the raw data."""
# pylint: disable=import-outside-toplevel
from openbb_core.provider.utils.helpers import amake_request
url = (
"https://markets.newyorkfed.org/api/rates/unsecured/effr/search.json?"
+ f"startDate={query.start_date}&endDate={query.end_date}"
)
results: list[dict] = []
response = await amake_request(url, **kwargs) # type: ignore
if response.get("refRates"): # type: ignore
results = response["refRates"] # type: ignore
if not results:
raise EmptyDataError()
return results
@staticmethod
def transform_data(
query: FederalReserveFederalFundsRateQueryParams,
data: list[dict],
**kwargs: Any,
) -> list[FederalReserveFederalFundsRateData]:
"""Transform data."""
results: list[FederalReserveFederalFundsRateData] = []
for d in data.copy():
_ = d.pop("type", None)
_ = d.pop("footnoteId", None)
results.append(FederalReserveFederalFundsRateData.model_validate(d))
return sorted(results, key=lambda x: x.date)
View on GitHub (pinned to 3e071fcc2c)
Solutions
- Widen or shift the date range to covered dates (EFFR starts 2016-07; the API also serves OBFR/other tenors from similar dates).
- Check the raw JSON at https://markets.newyorkfed.org/api/rates/unsecured/effr/search.json?startDate=...&endDate=... to see whether refRates is empty upstream.
- Handle EmptyDataError in the caller and treat it as zero rows rather than a failure.
Defensive patterns
Strategy: try-catch
Validate before calling
from datetime import date
start = max(start_date, date(2016, 7, 1)) # EFFR coverage begins July 2016
if start > end_date:
raise EmptyDataError('range predates EFFR coverage') Try / catch
from openbb_core.provider.standard_errors import EmptyDataError
try:
res = obb.economy.fed.fed_funds_rate(start_date=start, end_date=end)
except EmptyDataError:
res = None # no published rates in range Prevention
- Clamp date ranges to the series' coverage (EFFR starts 2016-07).
- Treat EmptyDataError as zero rows, not as an exception, in batch pipelines.
When it happens
Trigger: Querying the EFFR rate with a date range entirely before 2016 (EFFR history starts ~July 2016), a future date range, or a range with no published rates (e.g. weekends/holidays only if very narrow).
Common situations: Default date ranges pulled from other series (e.g. 2000 start) applied to EFFR; overnight-rate data requested over weekends only; date strings malformed so the API filters everything out.
Related errors
- No results found. Try adjusting the query parameters.
- No FOMC documents found.
- The query filters resulted in no data. Try again with differ
- No data returned from the Federal Reserve API.
- OBBject Extension Error -> An OBBject extension that acts
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/d4816b9212165ffc.
Report an issue: GitHub.