OpenBB-finance/OpenBB · error · OpenBBError

There was an error with the request and it was returned empt

Error message

There was an error with the request and it was returned empty.

What it means

OpenBBError raised when the Deribit get_instruments call for futures succeeded (HTTP 200, no exception) but the response's 'result' field was missing or an empty list, so there is nothing to return. It guards against silently returning [] which downstream consumers would misread as 'no futures exist'.

Source

Thrown at openbb_platform/providers/deribit/openbb_deribit/models/futures_instruments.py:120

        """Transform the query."""
        return DeribitFuturesInstrumentsQueryParams(**params)

    @staticmethod
    async def aextract_data(
        query: DeribitFuturesInstrumentsQueryParams,
        credentials: dict[str, str] | None,
        **kwargs: Any,
    ) -> list:
        """Extract data from Deribit API."""
        # pylint: disable=import-outside-toplevel
        from openbb_deribit.utils.helpers import get_instruments

        try:
            data = await get_instruments("all", "future")
        except Exception as e:  # pylint: disable=broad-except
            raise OpenBBError(f"Error fetching data: {e}") from e
        if not data:
            raise OpenBBError(
                "There was an error with the request and it was returned empty."
            )

        return data

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

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Retry after a minute — an empty 200 from this endpoint almost always means a transient Deribit-side issue.
  2. Hit the URL directly to confirm Deribit currently returns data: /api/v2/public/get_instruments?currency=any&kind=future.
  3. Check Deribit status page (status.deribit.com) for incidents.
  4. If it persists, compare the raw response shape against the expected {'result': [...]} structure for schema changes.
Defensive patterns

Strategy: retry

Try / catch

from openbb_core.provider.utils.errors import OpenBBError
for attempt in range(2):
    try:
        data = obb.derivatives.futures.instruments(provider="deribit")
        break
    except OpenBBError as e:
        if "returned empty" not in str(e) or attempt:
            raise
        time.sleep(30)  # empty 200 from Deribit is almost always transient

Prevention

When it happens

Trigger: Deribit returning a 200 response with an error body or empty result (e.g. malformed currency/kind combination slipped through, or an API-side incident returning empty payloads). Extremely rare in practice since get_instruments('all','future') normally returns hundreds of rows.

Common situations: Deribit API incidents/maintenance, intermediate proxies returning empty 200s, or a changed response schema after an API revision.

Related errors


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