OpenBB-finance/OpenBB · error · OpenBBError
OpenBBError(e) from e
Error message
OpenBBError(e) from e
What it means
Re-raise point in DeribitOptionsChains.aextract_data when fetching the options symbol dictionary (get_options_symbols) fails with an OpenBBError — typically the wrapped 'Failed to get instruments' network failure from helpers. The `raise OpenBBError(e) from e` adds no new information; it just propagates the upstream failure into the chain-fetch context.
Source
Thrown at openbb_platform/providers/deribit/openbb_deribit/models/options_chains.py:138
**kwargs: Any,
) -> list[dict]:
"""Extract the data."""
# pylint: disable=import-outside-toplevel
import asyncio # noqa
import json
import websockets
from openbb_deribit.utils.helpers import get_options_symbols
from pandas import to_datetime
from websockets.asyncio.client import connect
from warnings import warn
# We need to identify each option contract in order to fetch the chains data.
symbols_dict: dict[str, str] = {}
try:
symbols_dict = await get_options_symbols(query.symbol) # type: ignore
except OpenBBError as e:
raise OpenBBError(e) from e
# For each expiration, we need to create a websocket connection to fetch the data.
# We subscribe to each contract symbol and break the connection when we have all the data for an expiry.
# If it takes too long, we break the connection and return an error message.
results: list = []
messages: set = set()
async def call_api(expiration):
"""Call the Deribit API."""
symbols = symbols_dict[expiration]
received_symbols: set = set()
msg = {
"jsonrpc": "2.0",
"id": 3600,
"method": "public/subscribe",
"params": {"channels": ["ticker." + d + ".100ms" for d in symbols]},
}
async with connect("wss://www.deribit.com/ws/api/v2") as websocket:View on GitHub (pinned to 3e071fcc2c)
Solutions
- Verify connectivity to https://www.deribit.com and retry — the underlying cause is almost always the instrument-listing HTTP request failing.
- Inspect the chained exception (`__cause__`) for the real failure class (timeout, DNS, HTTP error).
- Add spacing between repeated options.chains calls to avoid rate limiting.
- If behind a proxy, set HTTP(S)_PROXY so amake_request can reach Deribit.
Defensive patterns
Strategy: retry
Try / catch
from openbb_core.provider.utils.errors import OpenBBError
try:
chains = obb.derivatives.options.chains(symbol="BTC", provider="deribit")
except OpenBBError as e:
cause = e.__cause__
if "Failed to get instruments" in str(cause or e):
chains = retry_with_backoff(lambda: obb.derivatives.options.chains(symbol="BTC", provider="deribit"))
else:
raise Prevention
- Check the chained __cause__ — the real failure is the instrument-listing HTTP call.
- Ensure network/proxy access before running chain fetches.
- Space out repeated options.chains calls to avoid rate limits.
When it happens
Trigger: Any network failure while listing option instruments for the underlying (the call hits /public/get_instruments before any websocket work starts). This occurs before websocket connections are opened, so the error appears immediately, not after a timeout.
Common situations: Blocked egress to deribit.com in containers/CI, transient Deribit outages, or aggressive rate limiting from repeated chain requests.
Related errors
- Failed to get futures curve -> {e.__class__.__name__ if hasa
- Error fetching data: {e}
- Error fetching data: {e}
- Invalid Deribit symbol. Supported symbols are: {', '.join(DE
- , ".join(messages)
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/af136e267c8a6405.
Report an issue: GitHub.