Skip to main content

OpenBB

Project description

Downloads LatestRelease

OpenBB is committed to build the future of investment research by focusing on an open source infrastructure accessible to everyone, everywhere.
OpenBBLogo
Check our website at openbb.co

OpenBB Platform 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 --pre

To install extensions that expand the core functionalities specify the extension name or use all to install all.

# Install single extension, e.g. openbb-charting
pip install openbb[charting] --pre

# Install all available extensions
pip install openbb[all] --pre

The --pre flag is required to install the latest alpha version.

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:

  1. OpenBB Hub
  2. Runtime
  3. 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")

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_platform.platform.core.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 and toml packages installed
    • To install these packages activate your virtual environment and run pip install poetry toml

How to install the platform in editable mode?

  1. Activate your virtual environment
  2. Navigate into the openbb_platform folder
  3. Run python dev_install.py to install the packages in editable mode

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openbb-4.0.0b1.tar.gz (52.4 kB view details)

Uploaded Source

Built Distribution

openbb-4.0.0b1-py3-none-any.whl (75.9 kB view details)

Uploaded Python 3

File details

Details for the file openbb-4.0.0b1.tar.gz.

File metadata

  • Download URL: openbb-4.0.0b1.tar.gz
  • Upload date:
  • Size: 52.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.9.18 Darwin/22.4.0

File hashes

Hashes for openbb-4.0.0b1.tar.gz
Algorithm Hash digest
SHA256 592b810360c20a3318ba56d5c8bc40812eadade8f002c0e62504921b3517abbf
MD5 93f9993b0214ed80a055a9cbdf33b1e8
BLAKE2b-256 503f4f7345eef63c611ccf6912f851449c545763d831b173422ff14727cfeb7d

See more details on using hashes here.

File details

Details for the file openbb-4.0.0b1-py3-none-any.whl.

File metadata

  • Download URL: openbb-4.0.0b1-py3-none-any.whl
  • Upload date:
  • Size: 75.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.9.18 Darwin/22.4.0

File hashes

Hashes for openbb-4.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 9598d14bf80329f163265ed49dacef0b3b3ab3a26e53199dccab0de3c5938a48
MD5 a477f1e26641a3afd3a15043cde122f5
BLAKE2b-256 1acdf0390ad4f345d1bea3458643f89b9c2052989a4d4dc0cc16d9a71af2a60c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page