OpenBB Core
raw JSON → 1.6.8 verified Mon Apr 27 auth: no python
OpenBB Core is the foundational library (v1.6.8) for the OpenBB platform, providing data connectors, financial modeling, and an SDK for programmatic access. It follows a monthly release cadence.
pip install openbb-core Common errors
error ModuleNotFoundError: No module named 'openbb' ↓
cause Installing 'openbb-core' but trying to import 'openbb'.
fix
Use 'from openbb_core.api.rest.controller import OBB' instead of 'from openbb import OBB'.
error AttributeError: module 'openbb_core' has no attribute 'OBB' ↓
cause Importing incorrectly: 'import openbb_core' and calling openbb_core.OBB.
fix
Correct import: 'from openbb_core.api.rest.controller import OBB'.
error openbb_core.api.rest.controller.OBB object has no attribute 'equity' ↓
cause Using deprecated endpoint path from v0.x.
fix
Use the new unified API endpoints (e.g., 'obb.equity.price.historical'). Refer to the official documentation for the current provider-agnostic interface.
error ValueError: Missing API key for provider 'polygon' ↓
cause Required API key not set as environment variable.
fix
Set the key: os.environ['POLYGON_API_KEY'] = 'your_key' before creating the OBB object, or set persistent env vars.
Warnings
breaking OpenBB Core v1+ removed the old monolithic openbb package structure. Imports must use openbb_core instead of openbb. ↓
fix Update imports: from openbb_core.api.rest.controller import OBB.
gotcha The OBB controller requires an active internet connection and valid API keys for data providers; missing keys cause silent empty results. ↓
fix Set environment variables like OPENBB_PAT (for personal access token) or provider-specific keys (e.g., OPENBB_POLYGON_API_KEY).
deprecated The legacy 'openbb' module is deprecated; install 'openbb-core' instead. Using 'pip install openbb' may install an older version. ↓
fix pip install openbb-core
Install
pip install openbb[all] Imports
- OBB wrong
from openbb import OBBcorrectfrom openbb_core.api.rest.controller import OBB - OBBError
from openbb_core.app.model.abstract.error import OBBError
Quickstart
from openbb_core.api.rest.controller import OBB
obb = OBB()
# Fetch historical price data for a stock
df = obb.equity.price.historical(symbol='AAPL', start_date='2023-01-01', end_date='2023-12-31')
print(df)