OpenBB
Project description
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.
Installation
The command below provides access to the core functionalities behind the OpenBB Platform.
pip install openbb
This will install the following data providers:
Extension Name | Description | Installation Command | Minimum Subscription Type Required |
---|---|---|---|
openbb-benzinga | Benzinga data connector | pip install openbb-benzinga | Paid |
openbb-federal-reserve | FederalReserve data connector | pip install openbb-federal-reserve | Free |
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 | Free |
openbb-tiingo | Tiingo data connector | pip install openbb-tiingo | Free |
openbb-tradingeconomics | TradingEconomics data connector | pip install openbb-tradingeconomics | Paid |
openbb-yahoo-finance | Yahoo Finance data connector | pip install openbb-yfinance | Free |
To install extensions that expand the core functionalities specify the extension name or use all
to install all.
# Install a single extension, e.g. openbb-charting and yahoo finance
pip install openbb[charting]
pip install openbb-yfinance
Alternatively, you can install all extensions at once.
pip install openbb[all]
Note: These instruction are specific to v4. For installation instructions and documentation for v3 go to our website.
Python
>>> from openbb import obb
>>> output = obb.equity.price.historical("AAPL")
>>> df = output.to_dataframe()
>>> df.head()
open high low ... change_percent label change_over_time
date ...
2022-09-19 149.31 154.56 149.10 ... 3.46000 September 19, 22 0.034600
2022-09-20 153.40 158.08 153.08 ... 2.28000 September 20, 22 0.022800
2022-09-21 157.34 158.74 153.60 ... -2.30000 September 21, 22 -0.023000
2022-09-22 152.38 154.47 150.91 ... 0.23625 September 22, 22 0.002363
2022-09-23 151.19 151.47 148.56 ... -0.50268 September 23, 22 -0.005027
[5 rows x 12 columns]
API keys
To fully leverage the OpenBB Platform you need to get some API keys to connect with data providers. Here are the 3 options on where to set them:
- OpenBB Hub
- Runtime
- Local file
1. OpenBB Hub
Set your keys at OpenBB Hub and get your personal access token from https://my.openbb.co/app/sdk/pat to connect with your account.
>>> from openbb import obb
>>> openbb.account.login(pat="OPENBB_PAT")
>>> # Persist changes in OpenBB Hub
>>> obb.account.save()
2. Runtime
>>> from openbb import obb
>>> obb.user.credentials.fmp_api_key = "REPLACE_ME"
>>> obb.user.credentials.polygon_api_key = "REPLACE_ME"
>>> # Persist changes in ~/.openbb_platform/user_settings.json
>>> obb.account.save()
3. Local file
You can 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"
}
}
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
Check openbb-core
README for additional info.
Install for development
To develop the OpenBB Platform you need to have the following:
- Git
- Python 3.8 or higher
- Virtual Environment with
poetry
andtoml
packages installed- To install these packages activate your virtual environment and run
pip install poetry toml
- To install these packages activate your virtual environment and run
How to install the platform in editable mode?
- Activate your virtual environment
- Navigate into the
openbb_platform
folder - Run
python dev_install.py
to install the packages in editable mode
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file openbb-4.1.7.tar.gz
.
File metadata
- Download URL: openbb-4.1.7.tar.gz
- Upload date:
- Size: 159.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.9.19 Linux/6.5.0-27-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d878e589475057d6c8128b3570a768e58dd4c7c53ed0dbf6af9bca24d9696b98 |
|
MD5 | 80f003ef8cd77f342e93630057d7ef02 |
|
BLAKE2b-256 | 022ce2b22f1bf94f178c1cc72b5e7bcaf4919b4e0a37b962776a5caf8dec3490 |
File details
Details for the file openbb-4.1.7-py3-none-any.whl
.
File metadata
- Download URL: openbb-4.1.7-py3-none-any.whl
- Upload date:
- Size: 187.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.9.19 Linux/6.5.0-27-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1711b44587e9f04a875e4205f018e568256933a7e69ecb4a0cd39aac18a4408 |
|
MD5 | 9dfefb05e3241c91f823f30b86e46a01 |
|
BLAKE2b-256 | d9e8c6eec957b6397f33e76e2c996fc5a9fd47e024c8aa989bc8dbade13abc38 |