OpenBB-finance/OpenBB · error · OpenBBError

Greeks are not available.

Error message

Greeks are not available.

What it means

Raised by the OptionsChainsData.total_dex property. Delta Dollars (DEX) requires per-contract delta, which the provider did not include, so has_greeks is False; the property guards with that flag and raises OpenBBError instead of returning misleading zeros. The sibling total_gex property raises the identical message for Gamma Exposure.

Source

Thrown at openbb_platform/core/openbb_core/provider/utils/options_chains_properties.py:216

    @property
    def total_volume(self) -> dict:
        """Return volume stats as a nested dictionary with keys: total, expiration, strike.

        Both, "expiration" and "strike", contain a list of records with fields:
        Calls, Puts, Total, Net Percent, PCR.
        """
        return self._get_stat("volume")

    @property
    def total_dex(self) -> dict:
        """Return Delta Dollars (DEX) as a nested dictionary with keys: total, expiration, strike.

        Both, "expiration" and "strike", contain a list of records with fields:
        Calls, Puts, Total, Net Percent, PCR.
        """
        if not self.has_greeks:
            raise OpenBBError("Greeks are not available.")
        return self._get_stat("DEX")

    @property
    def total_gex(self) -> dict:
        """Return Gamma Exposure stats as a nested dictionary with keys: total, expiration, strike.

        Both, "expiration" and "strike", contain a list of records with fields:
        Calls, Puts, Total, Net Percent, PCR.
        """
        if not self.has_greeks:
            raise OpenBBError("Greeks are not available.")
        return self._get_stat("GEX")

    @staticmethod
    def _identify_price_col(
        df: "DataFrame",
        option_type: Literal["call", "put"],
        bid_ask: Literal["bid", "ask"],

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Guard with result.has_greeks before accessing total_dex/total_gex
  2. Switch to a provider that returns greeks for the symbol (e.g. deribit for crypto, tradier/intraday tiers for equities)
  3. Compute exposure from to_df() output only for the columns that exist

Example fix

# before
dex = res.total_dex  # OpenBBError: Greeks are not available.

# after
dex = res.total_dex if res.has_greeks else None
if dex is None:
    print("provider returned no greeks; skipping exposure stats")
Defensive patterns

Strategy: validation

Validate before calling

if res.has_greeks:
    dex = res.total_dex
else:
    dex = None  # or raise your own feature-missing error

Type guard

def can_compute_dex(res) -> bool:
    return res.has_greeks and ("underlying_price" in res.dataframe.columns or res.last_price is not None)

Try / catch

from openbb_core.app.model.abstract.error import OpenBBError

try:
    dex = res.total_dex
except OpenBBError as e:
    if "Greeks are not available" in str(e):
        dex = None  # documented degradation: provider lacks greeks
    else:
        raise

Prevention

When it happens

Trigger: Calling result.total_dex (or total_gex) on a chains response from a provider that does not return greeks columns (delta/gamma), e.g. a delay-free quote-only provider or a provider without an options-greeks tier.

Common situations: Mixing providers: code written against a greeks-rich provider breaks when routed to a provider without them; free API tiers that omit greeks.

Related errors


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