OpenBB-finance/OpenBB · error · OpenBBError

Provider fallback failed. [Providers] {msg}

Error message

Provider fallback failed.
[Providers]
  {msg}

What it means

Raised by Container._get_provider when no explicit provider was chosen and every provider in the resolved priority list failed the credential check. For each candidate it runs _check_credentials: True means usable, False means the provider is registered but its required credentials (e.g. API keys) are empty, and None means the provider package is not installed. The message lists each provider with its failure reason.

Source

Thrown at openbb_platform/core/openbb_core/app/static/container.py:113

        if choice is None:
            commands = self._command_runner.user_settings.defaults.commands
            providers = (
                commands.get(command, {}).get("provider", []) or default_priority
            )
            tries = []
            if len(providers) == 1:
                return providers[0]
            for p in providers:
                result = self._check_credentials(p)
                if result:
                    return p
                if result is False:
                    tries.append((p, "missing credentials"))
                else:
                    tries.append((p, f"not installed, please install openbb-{p}"))

            msg = "\n  ".join([f"* '{pair[0]}' -> {pair[1]}" for pair in tries])
            raise OpenBBError(f"Provider fallback failed.\n[Providers]\n  {msg}")
        return choice

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Set at least one provider's credentials, e.g. obb.user.credentials.fmp_api_key = 'KEY' or export OPENBB_FMP_API_KEY=..., then retry the command
  2. Or pass an explicit provider whose credentials are already set: obb.equity.price.historical('AAPL', provider='yfinance')
  3. Install the missing provider package shown in the 'not installed' branch: pip install openbb-benzinga
  4. Fix the defaults priority list in openbb_settings.json so it only contains installed, credentialed providers

Example fix

# before
res = obb.equity.price.historical('AAPL')  # Provider fallback failed.

# after
obb.user.credentials.fmp_api_key = 'YOUR_KEY'
res = obb.equity.price.historical('AAPL', provider='fmp')
Defensive patterns

Strategy: validation

Validate before calling

from openbb import obb

def has_working_provider(command: str, providers: list[str]) -> bool:
    creds = obb.account._credentials  # or inspect obb.user.credentials model dump
    return any(p in obb.coverage.providers for p in providers)

Try / catch

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

try:
    res = obb.equity.price.historical('AAPL')
except OpenBBError as e:
    if 'Provider fallback failed' in str(e):
        # configure credentials or pick provider explicitly
        obb.user.credentials.fmp_api_key = KEY
        res = obb.equity.price.historical('AAPL', provider='fmp')
    else:
        raise

Prevention

When it happens

Trigger: Calling a router command such as obb.equity.price.historical(symbol='AAPL') without provider= while (a) every available provider's API keys are unset in user settings, or (b) providers in the defaults list (e.g. 'benzinga', 'fmp') have no openbb-<name> package installed. Also triggered when user_settings.defaults.commands['equity.price.historical']['provider'] lists only providers whose keys are missing.

Common situations: Fresh install with no API keys configured; uninstalling a provider package but leaving it in the defaults priority list; a wrong key name in openbb_settings.json or OPENBB_<PROVIDER>_API_KEY env vars; multiple providers configured but all keys blank.

Related errors


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