OpenBB-finance/OpenBB · error · OpenBBError
Error fetching data: {e}
Error message
Error fetching data: {e} What it means
OpenBBError raised in DeribitFuturesInstruments.aextract_data wrapping any exception from the get_instruments('all','future') call. This is a pure transport/wrapper error: get_instruments already converts its own failures to 'Failed to get instruments -> ...', so this fires on network exceptions or unexpected shapes before that mapping.
Source
Thrown at openbb_platform/providers/deribit/openbb_deribit/models/futures_instruments.py:118
@staticmethod
def transform_query(params: dict[str, Any]) -> DeribitFuturesInstrumentsQueryParams:
"""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
- Verify network access: curl 'https://www.deribit.com/api/v2/public/get_instruments?currency=any&kind=future' from the same host.
- Configure proxy/SSL environment variables if the runtime sits behind a corporate proxy.
- Retry with backoff for transient Deribit outages.
- Read the inner exception name in '{e}' to distinguish DNS/timeout (network) from other failures.
Defensive patterns
Strategy: retry
Try / catch
from openbb_core.provider.utils.errors import OpenBBError
try:
data = obb.derivatives.futures.instruments(provider="deribit")
except OpenBBError as e:
if "Error fetching data" in str(e):
wait_and_retry_once() # transport-level; usually transient
raise Prevention
- Verify deribit.com reachability from the runtime before jobs start.
- Configure proxy env vars in restricted networks.
- Cache instrument lists to reduce exposure to this endpoint's failures.
When it happens
Trigger: No route to deribit.com, TLS/proxy failures, or an exception raised inside get_instruments outside its try block (e.g. during URL building). Because get_instruments' own errors are re-wrapped here, the message may double-wrap.
Common situations: Corporate proxies blocking deribit.com, air-gapped CI, DNS outages, or Deribit API downtime.
Related errors
- Failed to get instruments -> {e.__class__.__name__}: {e}
- Failed to get futures curve -> {e.__class__.__name__ if hasa
- Error fetching data: {e}
- There was an error with the request and it was returned empt
- OpenBBError(e) from e
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/b4aa3d0f57716245.
Report an issue: GitHub.