OpenBB-finance/OpenBB · warning · EmptyDataError
No data found.
Error message
No data found.
What it means
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).
Source
Thrown at openbb_platform/providers/deribit/openbb_deribit/models/futures_historical.py:139
symbols = query.symbol.split(",")
results: list = []
for symbol in symbols:
try:
data = await get_ohlc_data(
symbol=symbol,
interval=query.interval,
start_date=query.start_date,
end_date=query.end_date,
)
if data:
results.extend(data)
except OpenBBError as e:
raise e from e
if not results:
raise EmptyDataError("No data found.")
return sorted(results, key=lambda x: x["date"])
@staticmethod
def transform_data(
query: DeribitFuturesHistoricalQueryParams, data: list, **kwargs: Any
) -> list[DeribitFuturesHistoricalData]:
"""Transform the data."""
symbols = query.symbol.split(",")
if len(symbols) == 1:
results: list[DeribitFuturesHistoricalData] = []
for d in data:
_ = d.pop("symbol", None)
results.append(DeribitFuturesHistoricalData.model_validate(d))
return [DeribitFuturesHistoricalData.model_validate(d) for d in data]
return [DeribitFuturesHistoricalData.model_validate(d) for d in data]
View on GitHub (pinned to 3e071fcc2c)
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.
Example fix
# before
data = obb.derivatives.futures.historical(symbol="BTC-PERPETUAL", start_date="2015-01-01", provider="deribit")
# after
from openbb_core.provider.utils.errors import EmptyDataError
try:
data = obb.derivatives.futures.historical(symbol="BTC-PERPETUAL", start_date="2020-01-01", end_date="2024-01-01", provider="deribit")
except EmptyDataError:
data = None Defensive patterns
Strategy: try-catch
Validate before calling
# sanity-check the window overlaps the instrument's life
from datetime import datetime, timezone
from openbb_deribit.utils.helpers import get_instruments
inst = {d["instrument_name"]: d["creation_timestamp"] for d in asyncio.run(get_instruments("all", "future"))}
created = datetime.fromtimestamp(inst["BTC-PERPETUAL"] / 1000, tz=timezone.utc)
assert start_date > created and end_date > start_date, "range outside instrument lifetime" Try / catch
from openbb_core.provider.utils.errors import EmptyDataError
try:
data = fetch_historical(sym, start, end)
except EmptyDataError:
data = [] # expected for ranges with no candles; log and continue
Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Invalid Deribit symbol: {symbol}. Supported symbols are: {',
- Invalid symbol: {s}. Valid symbols are: {all_symbols}
- No data found for the given symbol(s).
- There was an error with the request and it was returned empt
- All requests returned empty with no error messages.
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/8be50d1108322670.
Report an issue: GitHub.