OpenBB-finance/OpenBB · error · OpenBBError
Period '{query.period}' not supported.
Error message
Period '{query.period}' not supported. What it means
Input validation in the Intrinio cash-flow fetcher: only quarter, annual, ttm, and ytd periods are mapped to Intrinio's fundamentals 'type' parameter (QTR/FY/TTM/YTD). Any other period string reaches the else branch and raises OpenBBError before any HTTP request is made.
Source
Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/cash_flow.py:267
def transform_query(params: dict[str, Any]) -> IntrinioCashFlowStatementQueryParams:
"""Transform the query params."""
return IntrinioCashFlowStatementQueryParams(**params)
@staticmethod
async def aextract_data(
query: IntrinioCashFlowStatementQueryParams,
credentials: dict[str, str] | None,
**kwargs: Any,
) -> list[dict]:
"""Return the raw data from the Intrinio endpoint."""
api_key = credentials.get("intrinio_api_key") if credentials else ""
statement_code = "cash_flow_statement"
if query.period in ["quarter", "annual"]:
period_type = "FY" if query.period == "annual" else "QTR"
elif query.period in ["ttm", "ytd"]:
period_type = query.period.upper()
else:
raise OpenBBError(f"Period '{query.period}' not supported.")
base_url = "https://api-v2.intrinio.com"
fundamentals_url = (
f"{base_url}/companies/{query.symbol}"
f"/fundamentals?statement_code={statement_code}&type={period_type}"
)
if query.fiscal_year is not None:
if query.fiscal_year < 2008:
warn("Financials data is only available from 2008 and later.")
query.fiscal_year = 2008
fundamentals_url = fundamentals_url + f"&fiscal_year={query.fiscal_year}"
fundamentals_url = fundamentals_url + f"&api_key={api_key}"
fundamentals_data = (await get_data_one(fundamentals_url, **kwargs)).get(
"fundamentals", []
)
fiscal_periods = [
f"{item['fiscal_year']}-{item['fiscal_period']}"View on GitHub (pinned to 3e071fcc2c)
Solutions
- Use one of: 'quarter', 'annual', 'ttm', 'ytd'.
- Check the query param model/annotation for IntrinioCashFlowStatementQueryParams to see accepted values before calling.
- If you need a period Intrinio doesn't offer, fetch 'quarter' and aggregate client-side.
Example fix
# before obb.equity.cash_flow(provider='intrinio', symbol='AAPL', period='quarterly') # after obb.equity.cash_flow(provider='intrinio', symbol='AAPL', period='quarter')
Defensive patterns
Strategy: validation
Validate before calling
ALLOWED = {'quarter', 'annual', 'ttm', 'ytd'}
period = period.lower().strip()
if period not in ALLOWED:
period = {'quarterly': 'quarter', 'yearly': 'annual', 'year': 'annual'}.get(period, 'quarter')
obb.equity.cash_flow(provider='intrinio', symbol=sym, period=period) Type guard
def is_supported_period(p: str) -> bool:
return p in {'quarter', 'annual', 'ttm', 'ytd'} Try / catch
from openbb_core.app.model.abstract.error import OpenBBError
try:
res = obb.equity.cash_flow(provider='intrinio', symbol=sym, period=period)
except OpenBBError as e:
if 'not supported' in str(e):
res = obb.equity.cash_flow(provider='intrinio', symbol=sym, period='quarter')
else:
raise Prevention
- Whitelist period values per provider before calling
- Normalize '-ly' suffixes ('quarterly'->'quarter')
- Aggregate quarterly data client-side for custom periods
When it happens
Trigger: Calling obb.equity.cash-flow(provider='intrinio', period='monthly') or any non-standard value ('semi-annual', 'q', 'year', typo like 'anual'). The fetcher maps period to period_type and raises when no mapping exists.
Common situations: Copy-pasting period values valid for other providers (e.g. 'quarterly' with the -ly suffix); older scripts written when a different period vocabulary was accepted; UI dropdowns offering periods this provider does not support.
Related errors
- Unsupported file format. Please use .json or .env files.
- Failed to get Jupyter URL
- Invalid extension type(s): {', '.join(invalid)}. Valid choic
- No valid combinations of parameters were found. {','.join(me
- Error mapping the provided choices to series ID. {','.join(m
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/c5fbdf90284df5b2.
Report an issue: GitHub.