OpenBB-finance/OpenBB · error · OpenBBError

Intrinio Error Message -> {init_response['error']}: {init_re

Error message

Intrinio Error Message -> {init_response['error']}: {init_response.get('message')}

What it means

Raised in the pagination callback of IntrinioEquityHistoricalFetcher when the first page of the /securities/{symbol}/prices (or /intervals) response contains an 'error' key. The message embeds both the Intrinio error code and its message so the caller sees the upstream reason verbatim.

Source

Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py:237

        """Return the raw data from the Intrinio endpoint."""
        api_key = credentials.get("intrinio_api_key") if credentials else ""
        base_url = f"https://api-v2.intrinio.com/securities/{query.symbol}/prices"
        query_str = get_querystring(
            query.model_dump(by_alias=True), ["symbol", "interval"]
        )

        if query._interval_size:
            base_url += f"/intervals?interval_size={query._interval_size}"
            data_key = "intervals"
        elif query._frequency:
            base_url += f"?frequency={query._frequency}"
            data_key = "stock_prices"

        async def callback(response: ClientResponse, session: ClientSession) -> list:
            """Return the response."""
            init_response = await response.json()
            if "error" in init_response:
                raise OpenBBError(
                    f"Intrinio Error Message -> {init_response['error']}: {init_response.get('message')}"  # type: ignore
                )

            all_data: list = init_response.get(data_key, [])  # type: ignore

            next_page = init_response.get("next_page", None)  # type: ignore
            while next_page:
                url = response.url.update_query(next_page=next_page).human_repr()
                response_data = await session.get_json(url)

                all_data.extend(response_data.get(data_key, []))  # type: ignore
                next_page = response_data.get("next_page", None)  # type: ignore

            return all_data

        url = f"{base_url}&{query_str}&api_key={api_key}"

        return await amake_request(url, response_callback=callback, **kwargs)  # type: ignore

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Read the embedded error code/message — it is Intrinio's own text and names the exact problem
  2. Validate the symbol first (obb.equity.search / obb.equity.profile) and use Intrinio's expected ticker format
  3. For intraday intervals, confirm your plan supports real-time/intervals data and use supported interval values
  4. Check the date range parameters; some endpoints limit how far back you can query
Defensive patterns

Strategy: try-catch

Validate before calling

SUPPORTED_INTERVALS = {"1m", "5m", "10m", "15m", "30m", "60m", "1h", "1d", "1W", "1M"}

def historical_params_ok(symbol: str, interval: str) -> bool:
    return bool(symbol) and symbol.replace("-", "").replace(".", "").isalnum() and interval in SUPPORTED_INTERVALS

Type guard

from openbb_core.provider.abstract.error import OpenBBError

def is_intrinio_api_error(err: BaseException) -> bool:
    return isinstance(err, OpenBBError) and str(err).startswith("Intrinio Error Message")

Try / catch

from openbb_core.provider.abstract.error import OpenBBError

try:
    bars = await obb.equity.price.historical(provider="intrinio", symbol=sym, interval="1d")
except OpenBBError as e:
    if str(e).startswith("Intrinio Error Message"):
        log.warning("intrinio historical rejected %s: %s", sym, e)
        bars = None
    else:
        raise

Prevention

When it happens

Trigger: Historical price requests with an invalid/delisted symbol, unsupported parameter combos (e.g. an interval/frequency the security doesn't support), bad date parameters, or auth/subscription problems phrased without the 'api key' wording. Also fires when query._interval_size or _frequency resolution produces a URL the API rejects.

Common situations: Requesting intraday (1m/5m/...) bars where Intrinio requires the intervals API and specific plans; symbols with dashes/Share classes formatted incorrectly; start_date/end_date outside allowed ranges; paid-plan feature limits.

Related errors


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