{"record":{"id":"154bf8ef35c74796","repo":"OpenBB-finance/OpenBB","slug":"no-results-found-try-adjusting-the-query-paramete-154bf8","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/overnight_bank_funding_rate.py","lineNumber":105,"sourceCode":"    async def aextract_data(\n        query: FederalReserveOvernightBankFundingRateQueryParams,\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/obfr/search.json?\"\n            + f\"startDate={query.start_date}&endDate={query.end_date}\"\n        )\n        results: list[dict] = []\n        response = await amake_request(url, **kwargs)\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: FederalReserveOvernightBankFundingRateQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> list[FederalReserveOvernightBankFundingRateData]:\n        \"\"\"Transform data.\"\"\"\n        results: list[FederalReserveOvernightBankFundingRateData] = []\n        for d in data.copy():\n            _ = d.pop(\"type\", None)\n            _ = d.pop(\"revisionIndicator\", None)\n            _ = d.pop(\"footnoteId\", None)\n            results.append(FederalReserveOvernightBankFundingRateData.model_validate(d))\n\n        return sorted(results, key=lambda x: x.date)\n","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/federal_reserve/openbb_federal_reserve/models/overnight_bank_funding_rate.py#L87-L123","documentation":"Raised as EmptyDataError by FederalReserveOvernightBankFundingRateFetcher.aextract_data when the NY Fed API (/api/rates/unsecured/obfr/search.json) returns no 'refRates' for the requested date range. Same pattern as the EFFR fetcher: an empty upstream response is converted to the standard no-results error.","triggerScenarios":"Querying OBFR with dates before its publication start (~2016), a future range, or a range too narrow to include a business day.","commonSituations":"Reusing EFFR-style long history ranges that predate OBFR; weekend-only ranges; mistyped date parameters.","solutions":["Adjust the date range to covered business days (OBFR data starts around 2016).","Hit the NY Fed API URL directly to confirm whether refRates is empty for those dates.","Catch EmptyDataError and treat as zero rows in batch jobs."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"from datetime import date\nstart = max(start_date, date(2016, 4, 4))  # OBFR coverage begins April 2016\nif start > end_date:\n    raise EmptyDataError('range predates OBFR coverage')","typeGuard":null,"tryCatchPattern":"from openbb_core.provider.standard_errors import EmptyDataError\ntry:\n    res = obb.economy.fed.overnight_bank_funding_rate(start_date=start, end_date=end)\nexcept EmptyDataError:\n    res = None","preventionTips":["Clamp ranges to OBFR coverage (starts ~2016-04) — it differs slightly from EFFR.","Ensure ranges include at least one business day."],"tags":["federal-reserve","obfr","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"}