{"record":{"id":"a6708d838d1142ff","repo":"OpenBB-finance/OpenBB","slug":"error-fetching-data-e","errorCode":null,"errorMessage":"Error fetching data: {e}","messagePattern":"Error fetching data: (.+?)","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/deribit/openbb_deribit/models/futures_info.py","lineNumber":210,"sourceCode":"    async def aextract_data(\n        query: DeribitFuturesInfoQueryParams,\n        credentials: dict[str, str] | None,\n        **kwargs: Any,\n    ) -> list:\n        \"\"\"Extract data from the response.\"\"\"\n        # pylint: disable=import-outside-toplevel\n        import asyncio  # noqa\n        from openbb_core.provider.utils.errors import EmptyDataError, OpenBBError\n        from openbb_deribit.utils.helpers import get_ticker_data\n\n        result: list = []\n        symbols = query.symbol.split(\",\")\n        try:\n            tasks = [get_ticker_data(symbol) for symbol in symbols]\n            for task in asyncio.as_completed(tasks, timeout=10):\n                result.append(await task)\n        except Exception as e:  # pylint: disable=broad-except\n            raise OpenBBError(f\"Error fetching data: {e}\") from e\n\n        if not result:\n            raise EmptyDataError(\"No data found for the given symbol(s).\")\n\n        return sorted(result, key=lambda x: symbols.index(x[\"instrument_name\"]))\n\n    @staticmethod\n    def transform_data(\n        query: DeribitFuturesInfoQueryParams,\n        data: list,\n        **kwargs: Any,\n    ) -> list[DeribitFuturesInfoData]:\n        \"\"\"Transform the data.\"\"\"\n        return [DeribitFuturesInfoData(**d) for d in data]\n","sourceCodeStart":192,"sourceCodeEnd":225,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/deribit/openbb_deribit/models/futures_info.py#L192-L225","documentation":"OpenBBError wrapping any exception raised while awaiting the parallel get_ticker_data tasks for the requested symbols inside asyncio.as_completed(..., timeout=10). It is a generic transport/timeout wrapper: the inner exception text (network error, websocket failure, or the 'Failed to get ticker data' OpenBBError from helpers) is embedded in the message.","triggerScenarios":"A single ticker request exceeding the 10-second as_completed timeout, DNS/TLS failure to deribit.com, Deribit returning an error payload for one of the instruments, or Deribit rate-limiting concurrent requests.","commonSituations":"Batch-fetching many symbols at once from a rate-limited IP, running in CI or a container with restricted egress, or Deribit maintenance windows.","solutions":["Retry after a short backoff — the failure is usually transient (timeout or rate limit).","Reduce the number of symbols per request so all ticker fetches finish within the hardcoded 10-second window.","Inspect the embedded '{e}' text: a 'Failed to get ticker data' prefix points at a per-symbol API error (often an invalid/expired instrument name).","Verify outbound access to https://www.deribit.com from the runtime environment."],"exampleFix":"# before\nres = obb.derivatives.futures.info(symbol=\"BTC-PERPETUAL,ETH-PERPETUAL,SOL-PERPETUAL,...20 more\", provider=\"deribit\")\n\n# after\n# fetch in smaller batches\nfor batch in chunks(symbols, 5):\n    res = obb.derivatives.futures.info(symbol=\",\".join(batch), provider=\"deribit\")","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"from openbb_core.provider.utils.errors import OpenBBError\nimport time\nfor attempt in range(3):\n    try:\n        res = obb.derivatives.futures.info(symbol=batch, provider=\"deribit\")\n        break\n    except OpenBBError as e:\n        if attempt == 2 or \"Failed to get ticker data\" not in str(e):\n            raise\n        time.sleep(2 ** attempt)  # timeout/rate-limit: back off and retry","preventionTips":["Keep symbol batches small (<= 5) — the fetch has a hardcoded 10s window.","Add backoff between repeated futures.info calls.","Confirm egress to deribit.com in CI/container environments before running."],"tags":["deribit","network","timeout","async","rate-limit"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}