OpenBB-finance/OpenBB · warning · EmptyDataError

No data found.

Error message

No data found.

What it means

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.

Source

Thrown at openbb_platform/providers/deribit/openbb_deribit/models/futures_curve.py:183

            exp = ins_name.split("-")[1]
            hours_ago = d.get("hours_ago", 0)
            exp = (
                datetime.today().strftime("%Y-%m-%d")
                if exp == "PERPETUAL"
                else to_datetime(exp).strftime("%Y-%m-%d")
            )

            price = d.get("last_price", d.get("mark_price"))

            result = {"expiration": exp, "price": price}
            if query.hours_ago:
                result["hours_ago"] = hours_ago

            if price:
                futures_curve.append(DeribitFuturesCurveData.model_validate(result))

        if not futures_curve:
            raise EmptyDataError("No data found.")

        return sorted(futures_curve, key=lambda x: x.expiration)

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Retry shortly — pre-open instruments typically price up once trading begins
  2. Confirm with symbol='BTC' that priced curves return normally, isolating an instrument-specific issue
  3. Treat EmptyDataError as 'no rows available now' and degrade gracefully in the caller

Example fix

# before
curve = obb.derivatives.futures.curve(symbol='ETH', provider='deribit')

# after
try:
    curve = obb.derivatives.futures.curve(symbol='ETH', provider='deribit')
except EmptyDataError:
    curve = None  # instruments returned but none priced yet
Defensive patterns

Strategy: fallback

Try / catch

from openbb_core.provider.abstract.fetcher import EmptyDataError

try:
    curve = obb.derivatives.futures.curve(symbol=sym, provider='deribit').to_df()
except EmptyDataError:
    curve = pd.DataFrame()  # instruments returned but none carried a price

Prevention

When it happens

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

Common situations: 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.

Related errors


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