{"record":{"id":"dee21d95a213f0ef","repo":"OpenBB-finance/OpenBB","slug":"no-data-found-dee21d","errorCode":null,"errorMessage":"No data found","messagePattern":"No data found","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/deribit/openbb_deribit/models/futures_curve.py","lineNumber":156,"sourceCode":"                    if hours_data:\n                        data.extend(hours_data)\n            return data\n        except Exception as e:  # pylint: disable=broad-except\n            raise OpenBBError(\n                f\"Failed to get futures curve -> {e.__class__.__name__ if hasattr(e, '__class__') else e}: {e.args}\"\n            ) from e\n\n    @staticmethod\n    def transform_data(\n        query: DeribitFuturesCurveQueryParams, data: list, **kwargs: Any\n    ) -> list[DeribitFuturesCurveData]:\n        \"\"\"Transform the data.\"\"\"\n        # pylint: disable=import-outside-toplevel\n        from datetime import datetime  # noqa\n        from pandas import to_datetime\n\n        if not data:\n            raise EmptyDataError(\"No data found\")\n\n        futures_curve: list[DeribitFuturesCurveData] = []\n\n        for d in data:\n            if not d:\n                continue\n\n            ins_name = d.get(\"instrument_name\", \"\")\n            exp = ins_name.split(\"-\")[1]\n            hours_ago = d.get(\"hours_ago\", 0)\n            exp = (\n                datetime.today().strftime(\"%Y-%m-%d\")\n                if exp == \"PERPETUAL\"\n                else to_datetime(exp).strftime(\"%Y-%m-%d\")\n            )\n\n            price = d.get(\"last_price\", d.get(\"mark_price\"))\n","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/deribit/openbb_deribit/models/futures_curve.py#L138-L174","documentation":"transform_data raises EmptyDataError when the fetcher hands it an empty list — i.e. the Deribit API was reached but returned zero instruments for the underlying. OpenBB uses EmptyDataError as a well-known signal that the request succeeded but no rows exist, so the framework (and callers) can distinguish 'no data' from 'error'. For a BTC/ETH/PAXG curve this usually means the upstream snapshot fetch returned nothing.","triggerScenarios":"Symbol with no currently listed futures (possible for PAXG during low listing periods); upstream helper returned an empty instrument list due to a filtered/malformed response; hours_ago snapshot cache empty so comparison fetch yields nothing.","commonSituations":"Querying PAXG when Deribit has no listed dated futures; transient Deribit response anomalies; running immediately after market maintenance windows.","solutions":["Retry once — transient empty responses from Deribit usually resolve immediately","Try BTC or ETH to confirm the endpoint works, then re-try the original symbol","Handle EmptyDataError explicitly in callers as 'no rows' rather than propagating an error"],"exampleFix":"# before\nres = obb.derivatives.futures.curve(symbol='PAXG', provider='deribit')\n\n# after\nfrom openbb_core.provider.abstract.fetcher import EmptyDataError\ntry:\n    res = obb.derivatives.futures.curve(symbol='PAXG', provider='deribit')\nexcept EmptyDataError:\n    res = []  # no futures currently listed for this underlying","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"from openbb_core.provider.abstract.fetcher import EmptyDataError\n\ntry:\n    curve = obb.derivatives.futures.curve(symbol=sym, provider='deribit').to_df()\nexcept EmptyDataError:\n    curve = pd.DataFrame()  # no futures listed for this underlying right now","preventionTips":["Catch EmptyDataError as a distinct 'no rows' outcome in every consumer","Verify with BTC/ETH that the endpoint works before assuming code is broken","Retry once before giving up — transient empty responses occur"],"tags":["deribit","empty-data","no-results"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}