* feat(platform): add membership groups to Country type Add membership groups (G7, G20, EU, NATO, OECD, OPEC, BRICS) to the Country type, as suggested by maintainer in PR #7333. Changes: - Updated country_data.json with 'groups' field for each country - Added Country.groups property returning list of group memberships - Added Country.is_member_of(group) method for membership checks - Added comprehensive tests for group functionality This enables filtering and analysis by economic/political groupings: c = Country('Germany') c.groups # ['G7', 'G20', 'EU', 'NATO', 'OECD'] c.is_member_of('EU') # True Follow-up to #7333 * fix(platform): add Indonesia to BRICS (joined Jan 2025) * refactor(platform): use TypedDict for country data typing - Replace dict[str, Any] with CountryData TypedDict for proper type inference - Add official data sources to module docstring - Add _sources metadata section to country_data.json with references Sources: - G7: g7italy.it - G20: g20.org - EU: european-union.europa.eu - NATO: nato.int - OECD: oecd.org - OPEC: opec.org - BRICS: brics-russia2024.ru * fix(platform): update group membership reference URLs Replace broken/inaccessible URLs with stable Wikipedia references: - G7, G20, OECD, OPEC, BRICS → Wikipedia (stable, well-maintained) - EU, NATO → Updated to current official URLs * feat: add developer script to regenerate country_data.json from sources * fix: resolve codespell lint errors in update_country_data.py * fix: resolve black/ruff lint issues in update_country_data.py * feat(core): normalize unicode country names for ASCII input matching * fix(core): remove Angola from OPEC and Bangladesh from NATO Angola withdrew from OPEC effective Jan 2024. The OPEC scraper falls back to a hardcoded list which still included AO — removed it. Bangladesh was incorrectly scraped as a NATO member due to the scraper iterating all wikitables on the page. Now filters tables by their nearest h2 section header to only process member state tables. * fix(core): normalize country names to ASCII in update script Strip diacritical marks at generation time so country_data.json uses ASCII-only names (e.g., Turkiye, Curacao, Cote d'Ivoire). * Update openbb_platform/core/openbb_core/provider/utils/update_country_data.py Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * fix imports * fix: resolve mypy type narrowing for expected counts * restore reference.json --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
OpenBB Platform
| OpenBB is committed to build the future of investment research by focusing on an open source infrastructure accessible to everyone, everywhere. |
|---|
![]() |
| Check our website at openbb.co |
Overview
The OpenBB Platform provides a convenient way to access raw financial data from multiple data providers. The package comes with a ready to use REST API - this allows developers from any language to easily create applications on top of OpenBB Platform.
Please find the complete documentation at docs.openbb.co.
Installation
PyPI
The command below provides access to the core functionalities behind the OpenBB Platform, and a selection of sources.
pip install openbb
This will install the core, router modules, and the following data providers:
| Extension Name | Description | Installation Command | Minimum Subscription Type Required |
|---|---|---|---|
| openbb-benzinga | Benzinga data connector | pip install openbb-benzinga | Paid |
| openbb-bls | Bureau of Labor Statistics data connector | pip install openbb-bls | Free |
| openbb-congress-gov | US Congress API data connector | pip install openbb-congress-gov | Free |
| openbb-cftc | Commodity Futures Trading Commission data connector | pip install openbb-cftc | Free |
| openbb-econdb | EconDB data connector | pip install openbb-econdb | None |
| openbb-imf | IMF data connector | pip install openbb-imf | None |
| openbb-fmp | FMP data connector | pip install openbb-fmp | Free |
| openbb-fred | FRED data connector | pip install openbb-fred | Free |
| openbb-intrinio | Intrinio data connector | pip install openbb-intrinio | Paid |
| openbb-oecd | OECD data connector | pip install openbb-oecd | Free |
| openbb-polygon | Polygon data connector | pip install openbb-polygon | Free |
| openbb-sec | SEC data connector | pip install openbb-sec | None |
| openbb-tiingo | Tiingo data connector | pip install openbb-tiingo | Free |
| openbb-tradingeconomics | TradingEconomics data connector | pip install openbb-tradingeconomics | Paid |
| openbb-yfinance | Yahoo Finance data connector | pip install openbb-yfinance | None |
Extras
These packages are not installed when pip install openbb is run. They are available for installation separately or by running pip install openbb[all].
| Extension Name | Description | Installation Command | Minimum Subscription Type Required |
|---|---|---|---|
| openbb-mcp-server | Run the OpenBB Platform as a MCP server | pip install openbb-mcp-server | None |
| openbb-charting | Integrated Plotly charting library and dedicated window rendering. | pip install openbb-charting | None |
| openbb-alpha-vantage | Alpha Vantage data connector | pip install openbb-alpha-vantage | Free |
| openbb-biztoc | Biztoc News data connector | pip install openbb-biztoc | Free |
| openbb-cboe | Cboe data connector | pip install openbb-cboe | None |
| openbb-deribit | Deribit data connector | pip install openbb-deribit | None |
| openbb-ecb | ECB data connector | pip install openbb-ecb | None |
| openbb-famafrench | Ken French Data Library connector | pip install openbb-famafrench | None |
| openbb-federal-reserve | Federal Reserve data connector | pip install openbb-federal-reserve | None |
| openbb-finra | FINRA data connector | pip install openbb-finra | None / Free |
| openbb-finviz | Finviz data connector | pip install openbb-finviz | None |
| openbb-government-us | US Government data connector | pip install openbb-us-government | None |
| openbb-nasdaq | Nasdaq Data Link connector | pip install openbb-nasdaq | None / Free |
| openbb-seeking-alpha | Seeking Alpha data connector | pip install openbb-seeking-alpha | None |
| openbb-stockgrid | Stockgrid data connector | pip install openbb-stockgrid | None |
| openbb-tmx | TMX data connector | pip install openbb-tmx | None |
| openbb-tradier | Tradier data connector | pip install openbb-tradier | None |
| openbb-wsj | Wall Street Journal data connector | pip install openbb-wsj | None |
pip install openbb-equity openbb-yfinance
Python
>>> from openbb import obb
>>> output = obb.equity.price.historical("AAPL")
>>> df = output.to_dataframe()
>>> df.tail()
| date | open | high | low | close |
|---|---|---|---|---|
| 2025-09-30 | 254.86 | 255.92 | 253.11 | 254.63 |
| 2025-10-01 | 255.04 | 258.79 | 254.93 | 255.45 |
| 2025-10-02 | 256.58 | 258.18 | 254.15 | 257.13 |
| 2025-10-03 | 254.67 | 259.24 | 253.95 | 258.02 |
| 2025-10-06 | 257.945 | 259.07 | 255.05 | 256.69 |
API keys
To fully leverage the OpenBB Platform you need to get some API keys to connect with data providers (listed above).
Here's how to set them:
Local file
Specify the keys directly in the ~/.openbb_platform/user_settings.json file.
Populate this file with the following template and replace the values with your keys:
{
"credentials": {
"fmp_api_key": "REPLACE_ME",
"polygon_api_key": "REPLACE_ME",
"benzinga_api_key": "REPLACE_ME",
"fred_api_key": "REPLACE_ME"
}
}
Runtime
Credentials can be set for the current session only, using the Python interface.
>>> from openbb import obb
>>> obb.user.credentials.fred_api_key = "REPLACE_ME"
>>> obb.user.credentials.polygon_api_key = "REPLACE_ME"
Go to the documentation for more details.
REST API
The OpenBB Platform comes with a ready-to-use REST API built with FastAPI. Start the application using this command:
uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload
API documentation is found under "/docs", from the root of the server address, and is viewable in any browser supporting HTTP over localhost, such as Chrome.
See the documentation for runtime settings and configurations.
Local Development
To develop with the source code, you need to have the following:
- Git
- Python 3.10 - 3.13.
- Virtual Environment with
poetryinstalled.- Activate your virtual environment and run,
pip install poetry.
- Activate your virtual environment and run,
- A local copy of the GitHub repository
Install the repository for local development by using the installation script.
- Activate your virtual environment.
- Navigate into the
openbb_platformfolder. - Run
python dev_install.py -eto install all packages in editable mode.
See the documentation for an overview of the architecture and how to get started building your own extensions.
