OpenBB-finance/OpenBB · error · OpenBBError

Error fetching data: {e}

Error message

Error fetching data: {e}

What it means

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.

Source

Thrown at openbb_platform/providers/deribit/openbb_deribit/models/futures_info.py:210

    async def aextract_data(
        query: DeribitFuturesInfoQueryParams,
        credentials: dict[str, str] | None,
        **kwargs: Any,
    ) -> list:
        """Extract data from the response."""
        # pylint: disable=import-outside-toplevel
        import asyncio  # noqa
        from openbb_core.provider.utils.errors import EmptyDataError, OpenBBError
        from openbb_deribit.utils.helpers import get_ticker_data

        result: list = []
        symbols = query.symbol.split(",")
        try:
            tasks = [get_ticker_data(symbol) for symbol in symbols]
            for task in asyncio.as_completed(tasks, timeout=10):
                result.append(await task)
        except Exception as e:  # pylint: disable=broad-except
            raise OpenBBError(f"Error fetching data: {e}") from e

        if not result:
            raise EmptyDataError("No data found for the given symbol(s).")

        return sorted(result, key=lambda x: symbols.index(x["instrument_name"]))

    @staticmethod
    def transform_data(
        query: DeribitFuturesInfoQueryParams,
        data: list,
        **kwargs: Any,
    ) -> list[DeribitFuturesInfoData]:
        """Transform the data."""
        return [DeribitFuturesInfoData(**d) for d in data]

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Retry after a short backoff — the failure is usually transient (timeout or rate limit).
  2. Reduce the number of symbols per request so all ticker fetches finish within the hardcoded 10-second window.
  3. 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).
  4. Verify outbound access to https://www.deribit.com from the runtime environment.

Example fix

# before
res = obb.derivatives.futures.info(symbol="BTC-PERPETUAL,ETH-PERPETUAL,SOL-PERPETUAL,...20 more", provider="deribit")

# after
# fetch in smaller batches
for batch in chunks(symbols, 5):
    res = obb.derivatives.futures.info(symbol=",".join(batch), provider="deribit")
Defensive patterns

Strategy: retry

Try / catch

from openbb_core.provider.utils.errors import OpenBBError
import time
for attempt in range(3):
    try:
        res = obb.derivatives.futures.info(symbol=batch, provider="deribit")
        break
    except OpenBBError as e:
        if attempt == 2 or "Failed to get ticker data" not in str(e):
            raise
        time.sleep(2 ** attempt)  # timeout/rate-limit: back off and retry

Prevention

When it happens

Trigger: 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.

Common situations: Batch-fetching many symbols at once from a rate-limited IP, running in CI or a container with restricted egress, or Deribit maintenance windows.

Related errors


AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14). Data as JSON: /api/errors/a6708d838d1142ff. Report an issue: GitHub.