Files
OpenBB/openbb_platform
Danglewood 7bcef37874 docs/working-docs: Working V4 Docs PR (#5747)
* post-install clarification, fix links

* more links

* change word

* toolkit cleanup

* rename 'contributing' to 'development'

* update extensions

* some urls

* Update sdk-platform and v4-develop in urls (#5730)

* Update sdk-platform and v4-develop in urls

* Seprate Intrinio financials data tags into a different command (#5723)

* add `ebit` field in income statement standard model

* only add required data tags

* remove calculations data

* use `name` key instead of `tag` key

* set `period` as required in data

* remove `period` and `cik` from provider models

* add `equity/fundamental/search_financial_attributes` with tests

* clean descriptions file

* add `equity/fundamental/financial_attributes` with tests

* set `value` as `Optional`

* Fix threadpool test error (#5734)

* Remove ultima from deps (#5736)

* remove ultima from deps

* skip ultima test

* black

* change skip location

* try except statement to avoid error on the ci

* new currency reference rates pr (#5724)

* point files to linters (#5739)

* remove news from equity (#5741)

* Add tiingo provider (#5740)

* first commit

* things

* Add news endpoints

* CryptoHistorical

* Add currency and trailing dividend yield

* things working

* deps

* fix pre commit things

* tests?

* black on the tests

* pratty told me to add it

* integration tests

* added helpers

* crypto revamped

* currency revamped

* trailing dividend yield revamped

* equity historical revamped

* company news overhauled

* global news overhauled

* remove `tags` param from news models

* crypto correct `exchanges` description

* james smh

* re-recorded fetcher tests

* fixed integration tests

* econometrics smh

* james smh again

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>

* Add `derivatives` extension for `futures` and `options` (#5742)

* removed options and futures

* add derivatives extension

* cleanup

* bug #5649 (#5722)

* bug #5649

* fixing --a upmom, downmom

---------

Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>

* Rename the fmp search -> screener (#5744)

* Rename the fmp search -> screener

* misses some

* i cant copy paste

* docs/fix-urls: Updates the Terminal About URLs to match `/develop` (#5720)

* update Terminal about URLs and some other broken links

* ruff

* intro

* changing the heading levels

* dependency management sections

* structure

* developer guides

* structure

* contributor guides

* keywords and descriptions

* broken urls

* cool cards

* Cool cards (#5727)

* tidy up terminal/content

* some more tidy up

* fix styling for platform that was missing

* more tidy up

* improve color for dark and light mode

* create new reference card for more basic cards

* rename back to menus

* implement all index.md for terminal, except reference

* improve bot title

* more refactoring

* fix remaining index

* header styling

* more styling

* heheheheheheeh

* Revert "heheheheheheeh"

This reverts commit 7d095fcfd2.

* Ccards (#5733)

* links

* more links

* improved styling and chevron aligned to title

* fix index.mdx urls for Terminal

* update package.json

* update index.mdx

* fix generation

* spelling

* toolkit_extensions

* update data extensions

* couple of links

* add tiingo to data extensions list

---------

Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
Co-authored-by: James Maslek <jmaslek11@gmail.com>

* Stock leftover cleanup (#5745)

* change to equity in `.md` files

* `HistoricalStockSplits`->`HistoricalSplits`

* `StockInsiderTrading`->`InsiderTrading`

* sorry fmp

* `EquityHistorical` cleanup

* `EquityNBBO` cleanup

* .md leftover

* the last of stocks

* post-install clarification, fix links

* more links

* change word

* toolkit cleanup

* rename 'contributing' to 'development'

* Hotfix/urllib to dev group (#5732)

* use the urllib3 dependency on the dev group instead

* adapt the version script for the nightlies - if it's a nightly the package distribution name will have a different name

* add dev dependencies to the dev installation bc of the ci

* updating the import on validate_call according to: https://docs.pydantic.dev/latest/concepts/validation_decorator/
the way we were importing it breaks if pydantic=2.5
@montezdesousa

* loosing urllib3 version specification on the provider and adding it to platform dev deps

* rmeoving urllib from top level deps; and removing --with dev flag

* changing to ^ instead

* Revert "changing to ^ instead"

This reverts commit 7300904e9f.

* unnecessary dep

---------

Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>

* feature/v4-bop - Add ECB Balance of Payments (Replaces #5716) (#5726)

* add ecb balance of payments

* missing __init__.py files

* Nasdaq calendar earnings and fix FMP calendar earnings (#5718)

Co-authored-by: James Maslek <jmaslek11@gmail.com>

* feature/us-treasury-auctions: Adds Treasury Auctions endpoint and provider for US Government Data. (#5746)

* add government_us provider and treasury auctions endpoint

* black

* add param for cusip

* move logic for setting default start/end date

* Update hub<>platform credentials map (#5749)

* update hub<>platform credentials map

* typo

* Add API settings schema to system settings (#5743)

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>

* Skip checking creds (#5737)

* skip checking creds

* fix bug

* ok mypy

* add comment

* rename required_credentials

* fix

* fix top_retail bug

* don't require creds in some nasdaq fetchers

* black

* this was not here before

* fix tests

* update fetcher test

* update contributing guidelines

* Fix Quote (#5752)

* Fix Quote

* fixed return type and model validation

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>

* Wrap up renaming global news to world news on a model level (#5750)

* Wrap up renaming global news to world news on a model level

* cleanup

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>

* update extensions

* some urls

* Revert changes to v3 docs

---------

Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Ramazan <guvencramazan@yandex.com>
Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>

* POST request example

* update post example

* find symbols

* market calendars

* codespell

* codespell ftw

* improve main page light mode

---------

Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Ramazan <guvencramazan@yandex.com>
Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
2023-11-20 20:14:00 +00:00
..
2023-11-13 15:03:31 +00:00
2023-11-18 20:03:02 +00:00
2023-11-18 20:03:02 +00:00
2023-11-13 15:03:31 +00:00
2023-11-17 16:15:34 +00:00
2023-11-13 15:03:31 +00:00
2023-11-13 15:03:31 +00:00

OpenBB Platform

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

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