OpenBB SDK
raw JSON → 4.7.1 verified Fri May 01 auth: no python
OpenBB is an open-source investment research SDK for programmatic access to financial market data from multiple providers. Current version 4.7.1 requires Python 3.10+. Release cadence is monthly.
pip install openbb Common errors
error ModuleNotFoundError: No module named 'openbb_terminal' ↓
cause Trying to import old v3 package.
fix
Use 'import openbb' and create an OpenBB() instance.
error TypeError: __init__() missing 1 required positional argument: 'token' ↓
cause OpenBB() constructor now requires a token (or set env var).
fix
Pass token or set OPENBB_PERSONAL_ACCESS_TOKEN before instantiation.
error openbb.errors.OpenBBError: Provider 'fmp' not found. ↓
cause Misspelled provider name or provider not installed.
fix
Ensure correct provider name (e.g., 'fmp', 'polygon') and install extras: pip install openbb[all].
error AttributeError: module 'openbb' has no attribute 'stocks' ↓
cause Calling old v3 path pattern.
fix
Use obb.equity.* instead of obb.stocks.*.
Warnings
breaking v4 completely redesigned the API. All v3 code using openbb_terminal is incompatible. ↓
fix Rewrite calls using the new SDK pattern: import openbb; obb = openbb.OpenBB(token); obb.equity.price.historical(...).
breaking Removed the 'openbb_terminal' package. Must use 'import openbb' instead. ↓
fix Replace 'from openbb_terminal import ...' with 'import openbb' and use obb object.
gotcha Provider functions now require a 'provider' keyword argument. Missing it returns an error. ↓
fix Always specify provider, e.g., provider='fmp', provider='polygon'.
gotcha Personal access token is mandatory; environment variable OPENBB_PERSONAL_ACCESS_TOKEN must be set or passed to constructor. ↓
fix Set os.environ['OPENBB_PERSONAL_ACCESS_TOKEN'] = 'your_token' or pass token=... to OpenBB().
deprecated Some third-party provider modules are deprecated or moved to separate packages. ↓
fix Check openbb.dev for up-to-date provider support.
Install
pip install openbb[all] Imports
- openbb wrong
from openbb import openbbcorrectimport openbb - OBJ wrong
from openbb_sdk import obbcorrectfrom openbb import obb
Quickstart
import openbb
# Set personal access token (or use environment variable OPENBB_PERSONAL_ACCESS_TOKEN)
obb = openbb.OpenBB(token=os.environ.get('OPENBB_PERSONAL_ACCESS_TOKEN', ''))
# Get stock data
df = obb.equity.price.historical('AAPL', provider='fmp')
print(df)