{"record":{"id":"d4816b9212165ffc","repo":"OpenBB-finance/OpenBB","slug":"no-results-found-try-adjusting-the-query-paramete","errorCode":null,"errorMessage":"No results found. Try adjusting the query parameters.","messagePattern":"No results found\\. Try adjusting the query parameters\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/federal_reserve/openbb_federal_reserve/models/federal_funds_rate.py","lineNumber":125,"sourceCode":"    async def aextract_data(\n        query: FederalReserveFederalFundsRateQueryParams,\n        credentials: dict[str, str] | None,\n        **kwargs: Any,\n    ) -> list[dict]:\n        \"\"\"Extract the raw data.\"\"\"\n        # pylint: disable=import-outside-toplevel\n        from openbb_core.provider.utils.helpers import amake_request\n\n        url = (\n            \"https://markets.newyorkfed.org/api/rates/unsecured/effr/search.json?\"\n            + f\"startDate={query.start_date}&endDate={query.end_date}\"\n        )\n        results: list[dict] = []\n        response = await amake_request(url, **kwargs)  # type: ignore\n        if response.get(\"refRates\"):  # type: ignore\n            results = response[\"refRates\"]  # type: ignore\n        if not results:\n            raise EmptyDataError()\n        return results\n\n    @staticmethod\n    def transform_data(\n        query: FederalReserveFederalFundsRateQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> list[FederalReserveFederalFundsRateData]:\n        \"\"\"Transform data.\"\"\"\n        results: list[FederalReserveFederalFundsRateData] = []\n        for d in data.copy():\n            _ = d.pop(\"type\", None)\n            _ = d.pop(\"footnoteId\", None)\n            results.append(FederalReserveFederalFundsRateData.model_validate(d))\n\n        return sorted(results, key=lambda x: x.date)\n","sourceCodeStart":107,"sourceCodeEnd":142,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/federal_reserve/openbb_federal_reserve/models/federal_funds_rate.py#L107-L142","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"from datetime import date\nstart = max(start_date, date(2016, 7, 1))  # EFFR coverage begins July 2016\nif start > end_date:\n    raise EmptyDataError('range predates EFFR coverage')","typeGuard":null,"tryCatchPattern":"from openbb_core.provider.standard_errors import EmptyDataError\ntry:\n    res = obb.economy.fed.fed_funds_rate(start_date=start, end_date=end)\nexcept EmptyDataError:\n    res = None  # no published rates in range","preventionTips":["Clamp date ranges to the series' coverage (EFFR starts 2016-07).","Treat EmptyDataError as zero rows, not as an exception, in batch pipelines."],"tags":["federal-reserve","effr","empty-data","ny-fed-api"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}