Metadata-Version: 2.1
Name: openbb-nightly
Version: 4.1.5.dev202403280009
Summary: OpenBB
Author: OpenBB Team
Author-email: hello@openbb.co
Requires-Python: >=3.8,<3.12
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: aiohttp (>=3.9.0,<4.0.0)
Requires-Dist: aiohttp-client-cache (>=0.10.0,<0.11.0)
Requires-Dist: aiosqlite (>=0.19.0,<0.20.0)
Requires-Dist: arch (>=5.5.0,<6.0.0)
Requires-Dist: bandit (>=1.7.5,<2.0.0)
Requires-Dist: black (>=24.1.0,<25.0.0)
Requires-Dist: codespell (>=2.2.5,<3.0.0)
Requires-Dist: defusedxml (>=0.8.0rc2,<0.9.0)
Requires-Dist: exchange-calendars (>=4.2.8,<5.0.0)
Requires-Dist: fastapi (>=0.104.1,<0.105.0)
Requires-Dist: finvizfinance (==0.14.7)
Requires-Dist: html5lib (>=1.1,<2.0)
Requires-Dist: importlib-metadata (>=6.8.0,<7.0.0)
Requires-Dist: ipykernel (>=6.26.0,<7.0.0)
Requires-Dist: linearmodels (<=4.25)
Requires-Dist: mypy (>=1.6.1,<2.0.0)
Requires-Dist: nasdaq-data-link (>=1.0.4,<2.0.0)
Requires-Dist: nbformat (>=5.9.2,<6.0.0)
Requires-Dist: pandas (>=1.5.3)
Requires-Dist: pandas-ta (>=0.3.14b,<0.4.0)
Requires-Dist: plotly (>=5.17.0,<6.0.0)
Requires-Dist: poetry (>=1.7.0,<2.0.0)
Requires-Dist: posthog (>=3.3.1,<4.0.0)
Requires-Dist: pre-commit (>=3.5.0,<4.0.0)
Requires-Dist: pydantic (>=2.5.1,<3.0.0)
Requires-Dist: pydocstyle (>=6.3.0,<7.0.0)
Requires-Dist: pylint (>=3.0.2,<4.0.0)
Requires-Dist: pytest (>=7.4.3,<8.0.0)
Requires-Dist: pytest-cov (>=4.1.0,<5.0.0)
Requires-Dist: pytest-freezegun (>=0.4.2,<0.5.0)
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
Requires-Dist: python-jose (>=3.3.0,<4.0.0)
Requires-Dist: python-multipart (>=0.0.6,<0.0.7)
Requires-Dist: pywry (>=0.6.1,<0.7.0)
Requires-Dist: random-user-agent (>=1.0.1,<2.0.0)
Requires-Dist: reportlab (>=4.0.4,<5.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: requests-cache (>=1.1.0,<2.0.0)
Requires-Dist: ruff (>=0.1.5,<0.2.0)
Requires-Dist: scikit-learn (>=1.3.1,<2.0.0)
Requires-Dist: scipy (>=1.10.0,<2.0.0)
Requires-Dist: statsmodels (>=0.14.0,<0.15.0)
Requires-Dist: svglib (>=1.5.1,<2.0.0)
Requires-Dist: tox (>=4.11.3,<5.0.0)
Requires-Dist: types-python-dateutil (>=2.8.19.14,<3.0.0.0)
Requires-Dist: types-toml (>=0.10.8.7,<0.11.0.0)
Requires-Dist: urllib3 (>1.26.16)
Requires-Dist: uuid7 (>=0.1.0,<0.2.0)
Requires-Dist: uvicorn (>=0.24,<0.25)
Requires-Dist: websockets (>=12.0,<13.0)
Requires-Dist: xmltodict (>=0.13.0,<0.14.0)
Requires-Dist: yfinance (>=0.2.27,<0.3.0)
Description-Content-Type: text/markdown

# OpenBB Platform

[![Downloads](https://static.pepy.tech/badge/openbb)](https://pepy.tech/project/openbb)
[![LatestRelease](https://badge.fury.io/py/openbb.svg)](https://github.com/OpenBB-finance/OpenBBTerminal)

| OpenBB is committed to build the future of investment research by focusing on an open source infrastructure accessible to everyone, everywhere. |
| :---------------------------------------------------------------------------------------------------------------------------------------------: |
|              ![OpenBBLogo](https://user-images.githubusercontent.com/25267873/218899768-1f0964b8-326c-4f35-af6f-ea0946ac970b.png)               |
|                                                 Check our website at [openbb.co](www.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.

```bash
pip install openbb
```

This will install the following data providers:

| Extension Name          | Description                                                               | Installation Command                | Minimum Subscription Type Required |
| ----------------------- | ------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------- |
| openbb-benzinga         | [Benzinga](https://www.benzinga.com/apis/en-ca/) data connector           | pip install openbb-benzinga         | Paid                               |
| openbb-federal-reserve  | [FederalReserve](https://www.federalreserve.gov/data.html) data connector | pip install openbb-federal-reserve  | Free                               |
| openbb-fmp              | [FMP](https://site.financialmodelingprep.com/developer/) data connector   | pip install openbb-fmp              | Free                               |
| openbb-fred             | [FRED](https://fred.stlouisfed.org/) data connector                       | pip install openbb-fred             | Free                               |
| openbb-intrinio         | [Intrinio](https://intrinio.com/pricing) data connector                   | pip install openbb-intrinio         | Paid                               |
| openbb-oecd             | [OECD](https://data.oecd.org/) data connector                             | pip install openbb-oecd             | Free                               |
| openbb-polygon          | [Polygon](https://polygon.io/) data connector                             | pip install openbb-polygon          | Free                               |
| openbb-sec              | [SEC](https://www.sec.gov/edgar/sec-api-documentation) data connector     | pip install openbb-sec              | Free                               |
| openbb-tiingo           | [Tiingo](https://www.tiingo.com/about/pricing) data connector             | pip install openbb-tiingo           | Free                               |
| openbb-tradingeconomics | [TradingEconomics](https://tradingeconomics.com/api) data connector       | pip install openbb-tradingeconomics | Paid                               |
| openbb-yahoo-finance    | [Yahoo Finance](https://finance.yahoo.com/) 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.

```bash
# 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.

```bash
pip install openbb[all]
```

> Note: These instruction are specific to v4. For installation instructions and documentation for v3 go to our [website](https://docs.openbb.co/sdk).

## Python

```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](https://my.openbb.co/app/sdk/api-keys) and get your personal access token from <https://my.openbb.co/app/sdk/pat> to connect with your account.

```python
>>> from openbb import obb
>>> openbb.account.login(pat="OPENBB_PAT")

>>> # Persist changes in OpenBB Hub
>>> obb.account.save()
```

### 2. Runtime

```python
>>> 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:

```json
{
  "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:

```bash
uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload
```

Check `openbb-core` [README](https://pypi.org/project/openbb-core/) 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
  1. Navigate into the `openbb_platform` folder
  1. Run `python dev_install.py` to install the packages in editable mode

