* Linting * added extra params and file cleanup in yfinance * `yfinance` Fetcher refactored * `cboe` Fetcher refactored, pydocstyle pass and cleanup * `yfinance` Fetcher cleanup and pydocstyle pass * `cboe` Fetcher cleanup * ruff + black * Linting * Fetcher cleanup and typing, bug fixes Co-authored-by: montezdesousa * Fix CPI * Fix CBOE typing * Fix yfinance typing * MyPy improvements * remove pass * property reorder * update get_data_many to return raw data and refactor treasury rates * refactor stocksplits * stockquote * change data one and stock peers * stock ownership * stock news * stock multiples * insider trading * stock eod * share stats * sec fillings * risk premium * revenue business line * revenue geographic * price target * black * treasury rates descriptions * more descriptions * remove The from descriptions * remove The from descriptions * price target consensus * polygon forex pairs * fix `Annotated is not defined` in static files * cboe Fetcher relisted data and pyproject cleanup * major indices eod * yfinance relisted data * major indixes const * key metrics * key executive * institutional ownership * forgot futures curve * income statement * income statement growth * remove unecessary var * black * rename var * change generic var names * rename abstract fetcher inner properties * remove unused provider helpers * add class description * import from ParamSpec regardless of version * specific imports hub service & ruff * remove useless inspect import * update comment * remove mypy comment * fmp Fetcher refactor, pydocstyle pass and cleanup * ruff * query.Dict to query.dict and set dates to 1 year diff * polygon date interval is 1 year * typing * mypy --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
OpenBB Charting extension
This extension provides a charting library for OpenBB SDK.
The library includes:
- a charting infrastructure based on Plotly
- a set of charting components
- prebuilt charts for a set of commands that are built-in OpenBB SDK extensions
Installation
To install the extension, run the following command in this folder:
pip install .
PyWry dependency on Linux
The PyWry dependency handles display of interactive charts and tables in a separate window. It is installed automatically with the OpenBB Charting extension.
When using Linux distributions, the PyWry dependency requires certain dependencies to be installed first.
-
Debian-based / Ubuntu / Mint:
sudo apt install libwebkit2gtk-4.0-dev -
Arch Linux / Manjaro:
sudo pacman -S webkit2gtk -
Fedora:
sudo dnf install gtk3-devel webkit2gtk3-devel
Usage
To use the extension, run any of the OpenBB SDK endpoints with the chart argument set to True.
Here's an example how it would look like in a python interface:
from openbb import obb
stock_data = obb.stocks.load(symbol="TSLA", chart=True)
This results in a OBBject object containing a chart attribute, which contains Plotly JSON data.
In order to display the chart, you need to call the show() method:
stock_data.show()
Note: The
show()method currently works either in a Jupyter Notebook or in a standalone python script with a PyWry based backend properly initialized.