OpenBB-finance/OpenBB · warning · EmptyDataError

No data was found using the applied filters. Check the param

Error message

No data was found using the applied filters. Check the parameters.

What it means

Raised as EmptyDataError by FMPCurrencySnapshots.transform_data when the raw data was non-empty but no rows survived filtering by base currency and quote_type. For quote_type='indirect' symbols must start with the base code; otherwise they must end with it. The error means your requested base(s) matched nothing in the snapshot.

Source

Thrown at openbb_platform/providers/fmp/openbb_fmp/models/currency_snapshots.py:147

                    if isinstance(query.counter_currencies, list)
                    else query.counter_currencies.split(",")
                )
                temp = (
                    temp.query("`counter_currency`.isin(@counter_currencies)")
                    .set_index("counter_currency")
                    # Sets the counter currencies in the order they were requested.
                    .filter(items=counter_currencies, axis=0)
                    .reset_index()
                ).rename(columns={"index": "counter_currency"})
            # If there are no records, don't concatenate.
            if len(temp) > 0:
                # Convert the Unix timestamp to a datetime.
                temp.timestamp = temp.timestamp.apply(
                    lambda x: safe_fromtimestamp(x, tz=timezone.utc)
                )
                new_df = concat([new_df, temp])
            if len(new_df) == 0:
                raise EmptyDataError(
                    "No data was found using the applied filters. Check the parameters."
                )
            new_df = new_df.replace({nan: None})

        return [
            FMPCurrencySnapshotsData.model_validate(d)
            for d in new_df.reset_index(drop=True).to_dict(orient="records")
        ]

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Use valid 3-letter ISO-4217 base codes that FMP actually quotes (USD, EUR, JPY, GBP, ...)
  2. Try the same call with quote_type flipped ('direct' vs 'indirect') since pair naming direction differs
  3. Call once without base filters and inspect the 'symbol' column to see which bases exist, then restrict to those
  4. Catch EmptyDataError and report 'unsupported base currency' to the caller

Example fix

# before
res = obb.currency.snapshots(provider='fmp', base='UST', quote_type='indirect')  # typo + wrong direction

# after
res = obb.currency.snapshots(provider='fmp', base='USD', quote_type='direct')
Defensive patterns

Strategy: validation

Validate before calling

KNOWN_BASES = {'USD','EUR','JPY','GBP','CHF','CAD','AUD','NZD','CNH'}  # subset FMP quotes
base = 'XYZ'
if base.upper() not in KNOWN_BASES:
    raise ValueError(f'Unsupported base currency: {base}')

Type guard

null

Try / catch

from openbb_core.provider.utils.errors import EmptyDataError
try:
    snap = obb.currency.snapshots(provider='fmp', base=base, quote_type=qt)
except EmptyDataError:
    # retry with flipped quote_type before giving up
    snap = obb.currency.snapshots(provider='fmp', base=base, quote_type='indirect' if qt == 'direct' else 'direct')

Prevention

When it happens

Trigger: Calling obb.currency.snapshots(base='XYZ') where no returned symbol starts/ends with 'XYZ'; using a base code FMP does not quote (e.g. an exotic or misspelled code like 'EURR' or 'UST'); requesting quote_type='indirect' when FMP only lists the pair the other way around.

Common situations: Misspelled ISO currency codes, unsupported exotic currencies, mismatch between the requested quote_type convention and how FMP names the pairs, or combining multiple base currencies where one is valid and another is not.

Related errors


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