{"record":{"id":"7f8016efdf295119","repo":"OpenBB-finance/OpenBB","slug":"no-data-found-7f8016","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":183,"sourceCode":"            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\n            result = {\"expiration\": exp, \"price\": price}\n            if query.hours_ago:\n                result[\"hours_ago\"] = hours_ago\n\n            if price:\n                futures_curve.append(DeribitFuturesCurveData.model_validate(result))\n\n        if not futures_curve:\n            raise EmptyDataError(\"No data found.\")\n\n        return sorted(futures_curve, key=lambda x: x.expiration)\n","sourceCodeStart":165,"sourceCodeEnd":186,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/deribit/openbb_deribit/models/futures_curve.py#L165-L186","documentation":"After transforming rows into DeribitFuturesCurveData, transform_data raises EmptyDataError if not a single row produced a truthy price (last_price or mark_price). This differs from the earlier 'No data found' check: here raw data existed, but every entry lacked a usable price — e.g. delisted or unpriced instruments in the response — so nothing could be validated into the output model.","triggerScenarios":"Deribit returning instrument entries with null/absent last_price and mark_price (pre-open or settled contracts); a response consisting only of instruments with zero/None prices; filtered responses from the hours_ago cache that carry no price fields.","commonSituations":"Off-hours queries when thin books have no last trade and mark price fields are missing from a cached snapshot; expired contracts still appearing in instrument lists.","solutions":["Retry shortly — pre-open instruments typically price up once trading begins","Confirm with symbol='BTC' that priced curves return normally, isolating an instrument-specific issue","Treat EmptyDataError as 'no rows available now' and degrade gracefully in the caller"],"exampleFix":"# before\ncurve = obb.derivatives.futures.curve(symbol='ETH', provider='deribit')\n\n# after\ntry:\n    curve = obb.derivatives.futures.curve(symbol='ETH', provider='deribit')\nexcept EmptyDataError:\n    curve = None  # instruments returned but none priced yet","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()  # instruments returned but none carried a price","preventionTips":["Distinguish this late-stage EmptyDataError (rows existed, no prices) from the early one (no rows)","Retry during market hours when thin instruments get priced","Degrade to None/empty in dashboards instead of surfacing a hard error"],"tags":["deribit","empty-data","price-missing"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}