{"record":{"id":"8be50d1108322670","repo":"OpenBB-finance/OpenBB","slug":"no-data-found-8be50d","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_historical.py","lineNumber":139,"sourceCode":"\n        symbols = query.symbol.split(\",\")\n        results: list = []\n\n        for symbol in symbols:\n            try:\n                data = await get_ohlc_data(\n                    symbol=symbol,\n                    interval=query.interval,\n                    start_date=query.start_date,\n                    end_date=query.end_date,\n                )\n                if data:\n                    results.extend(data)\n            except OpenBBError as e:\n                raise e from e\n\n        if not results:\n            raise EmptyDataError(\"No data found.\")\n\n        return sorted(results, key=lambda x: x[\"date\"])\n\n    @staticmethod\n    def transform_data(\n        query: DeribitFuturesHistoricalQueryParams, data: list, **kwargs: Any\n    ) -> list[DeribitFuturesHistoricalData]:\n        \"\"\"Transform the data.\"\"\"\n        symbols = query.symbol.split(\",\")\n        if len(symbols) == 1:\n            results: list[DeribitFuturesHistoricalData] = []\n            for d in data:\n                _ = d.pop(\"symbol\", None)\n                results.append(DeribitFuturesHistoricalData.model_validate(d))\n            return [DeribitFuturesHistoricalData.model_validate(d) for d in data]\n        return [DeribitFuturesHistoricalData.model_validate(d) for d in data]\n","sourceCodeStart":121,"sourceCodeEnd":156,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/deribit/openbb_deribit/models/futures_historical.py#L121-L156","documentation":"EmptyDataError raised by DeribitFuturesHistorical.fetch_data when the OHLC extraction loop produced zero rows for all requested symbols. It signals the request succeeded syntactically but the exchange returned no candles inside the given date/interval window (or every per-symbol fetch silently produced nothing).","triggerScenarios":"Requesting a date range entirely outside the instrument's lifetime (before listing or in the future), a start_date==end_date window with no candles, an interval/window combination Deribit rejects per-window, or a symbol whose data only exists on a different instrument name.","commonSituations":"Backfill jobs running over weekends on illiquid contracts with no trades, date arithmetic bugs producing 1970 or far-future dates, or using a perpetual alias after the instrument was rolled.","solutions":["Widen or correct the start_date/end_date range to overlap the instrument's actual trading history (Deribit only returns data from creation_timestamp onward).","Verify the instrument trades on Deribit by fetching obb.derivatives.futures.instruments(provider='deribit') and checking volume.","Catch EmptyDataError as an expected 'no rows' outcome in batch jobs instead of treating it as a crash.","For very long ranges, split requests into smaller chunks — per-window fetch errors are swallowed and can leave results empty."],"exampleFix":"# before\ndata = obb.derivatives.futures.historical(symbol=\"BTC-PERPETUAL\", start_date=\"2015-01-01\", provider=\"deribit\")\n\n# after\nfrom openbb_core.provider.utils.errors import EmptyDataError\ntry:\n    data = obb.derivatives.futures.historical(symbol=\"BTC-PERPETUAL\", start_date=\"2020-01-01\", end_date=\"2024-01-01\", provider=\"deribit\")\nexcept EmptyDataError:\n    data = None","handlingStrategy":"try-catch","validationCode":"# sanity-check the window overlaps the instrument's life\nfrom datetime import datetime, timezone\nfrom openbb_deribit.utils.helpers import get_instruments\ninst = {d[\"instrument_name\"]: d[\"creation_timestamp\"] for d in asyncio.run(get_instruments(\"all\", \"future\"))}\ncreated = datetime.fromtimestamp(inst[\"BTC-PERPETUAL\"] / 1000, tz=timezone.utc)\nassert start_date > created and end_date > start_date, \"range outside instrument lifetime\"","typeGuard":null,"tryCatchPattern":"from openbb_core.provider.utils.errors import EmptyDataError\ntry:\n    data = fetch_historical(sym, start, end)\nexcept EmptyDataError:\n    data = []  # expected for ranges with no candles; log and continue\n","preventionTips":["Treat EmptyDataError as 'zero rows', not as a failure, in batch pipelines.","Clamp requested ranges to the instrument's creation date.","Log symbol+range alongside the error for reproducibility."],"tags":["deribit","no-data","ohlc","futures","empty-response"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}