There are currently four options to install the terminal:
- Using the Installer (recommended if you just want to use the terminal)
- Using Python (recommended if you want to develop new features)
- Using Docker (alternative option to the installer if preferred)
First step in all options is to star the project
This installation type supports both Windows and Unix systems (Linux + MacOS). However, on Windows it can become messy so it is easier to use Windows Subsystem Linux (WSL) on this operating system. WSL emulates a Linux machine inside your Windows system.
If you are using macOS or other Linux operating systems you can jump the next section Installing the terminal.
If you are using Windows you first you need to install WSL. The process is simple and a tutorial can be found here. Once you reach the section Update Linux on that tutorial, you should have a linux machine installed and can proceed to the next steps.
Since WSL installation is headless by default (i.e., you have only access to a terminal running a linux distribution) you need some extra steps to be able to visualize the charts produced by the terminal (more detailed tutorial here):
-
Dynamically export the DISPLAY environment variable in WSL2:
# add to the end of ~/.bashrc file export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0 # source the file source ~/.bashrc
-
Download and install VcXsrv
-
When running the program is important to check "Disable access control"
After this, VcXsrv
should be running successfully and we can proceed to terminal installation.
Although we extremely recommend using WSL to run the terminal on windows, if you don't want or can't for some reason, you can try install the terminal directly on Windows without WSL. If you'd like to see a video recording of the installation on Windows without WSL, @JohnnyDankseed has made one available here.
These steps are common in all operating systems (Windows with or without WSL, MacOS or Linux).
This project supports Python 3.8 and 3.9. By default, the newly created virtual environment will use Python 3.9.13
Our current recommendation is to use this project with Anaconda's Python distribution - either full Anaconda3 Latest or Miniconda3 Latest (recommended). Several features in this project utilize Machine Learning. Machine Learning Python dependencies are optional. For MacOS systems, the "Miniconda3 MacOSX 64-bit" version that works on both Intel and M1 macs is recommended.
NOTE: We recommend using conda
and poetry
because it just works. You can use other python
distributions and use raw pip
instead of poetry
but you will very likely bump into installation
issues.
-
Install Anaconda (It's on the AUR as anaconda or miniconda3!)
-
Follow the instructions specified on the website above:
- If you are using macOS click Installing on MacOS
- If you are using WSL or Linux click Installing on Linux
- If you are using Windows click Installing on Windows. ONLY REQUIRED IF NOT USING WSL, you also need to install/update Microsoft C++ Build Tools from here: https://visualstudio.microsoft.com/visual-cpp-build-tools/
-
After following the steps, confirm that you have it by opening a terminal and running:
conda -V
. The output should be something along the lines of:conda 4.11.0
-
-
Install git
conda install -c anaconda git
For Linux users only, run these additional commands:
sudo apt update sudo apt install -y cmake gcc pip install cmake
-
Clone the Project
- Via HTTPS:
git clone https://github.com/OpenBB-finance/OpenBBTerminal.git
- via SSH:
git clone [email protected]:OpenBB-finance/OpenBBTerminal.git
- Via HTTPS:
-
Navigate into the project's folder
cd OpenBBTerminal/
-
Create Environment
You can name the environment whatever you want. Although you could use names such as:
welikethestock
,thisistheway
ordiamondhands
, we recommend something simple and intuitive likeobb
. This is because this name will be used from now onwards.Please note, the following setup has been confirmed to work for all OS (including M1) with the standard miniconda distribution.
https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
If you are using a different distribution, you will need to install it manually before proceeding.
conda env create -n obb --file build/conda/conda-3-9-env.yaml
Or, to include machine learning type:
conda env create -n obb --file build/conda/conda-3-9-env-full.yaml
Note: Using python 3.10 can lead to undesirable functionality for certain commands.
-
Activate the virtual environment
conda activate obb
Note: At the end, you can deactivate it with:
conda deactivate
. -
Install dependencies with poetry
Install the main dependencies with
poetry install
For machine learning instead type:
poetry install -E prediction
If you are having trouble with Poetry (e.g. on a non-conda python), simply install requirements.txt with pip
pip install -r requirements.txt
-
You're ready to use the terminal!
python terminal.py
If you are using macOS and if you get SyntaxError, you might need to run this instead
python3 terminal.py
-
(Windows - Optional and only if you are not using WSL) Speeding up opening process in the future
After you've installed OpenBB Terminal, you'll find a file named "OpenBB Terminal.bat". You can use this file to open OpenBB Terminal quicker. This file can be moved to your desktop if you'd like. If you run into issues while trying to run the batch file. If you run into issues with the batch files, edit the file and check to see if the directories match up. This file assumes you used the default directories when installing.
-
Jupyter Lab (Optional. Early alpha). User the Terminal from Jupyter Lab
You can install Jupyter Lab extensions that help you manage settings and launch the terminal in a JL bash console using the commands in the jupyterlab/README.md
NOTE: When you close the terminal and re-open it, the only command you need to re-call is conda activate gst
before you call python terminal.py
again.
TROUBLESHOOT: If you are having troubles to install, check our newest troubleshoot page. You can also reach for help on our discord.
By default we advice using conda
and poetry
for environment setup and dependency management.
Conda ships binaries for packages like numpy
so these dependencies are
not built from source locally by pip
.
Poetry solves the dependency tree in a way that the dependencies of dependencies of dependencies
use versions that are compatible with each other.
If you are using a conda environment the build/conda
folder contains multiple .yaml
configuration
files that you can choose from.
If you are using other python distributions we highly recommend that you use some virtual
environment like virtualenv
or pyenv
for installing the terminal dependency libraries.
Requirements files that you can find in the project root:
requirements.txt
list all the dependencies without Machine Learning librariesrequirements-full.txt
list all the dependencies without Machine Learning libraries
The dependency tree is solved by poetry.
Note: The libraries specified in the requirements files have been tested and work for the purpose of this project, however, these may be older versions. Hence, it is recommended for the user to set up a virtual python environment prior to installing these. This allows to keep dependencies required by different projects in separate places.
The terminal is constantly being updated with new features and bug fixes, hence, for your terminal to be update, you can run:
git pull
to get the latest changes.
If this fails due to the fact that you had modified some python files, and there's a conflict with the updates, you can use:
git stash
Then, re-run poetry install
or pip install -r requirements.txt
to get any new dependencies.
Once installation is finished, you're ready to openbb.
If you stashed
your changes previously, you can un-stash them with:
git stash pop
-
Running raspbian lite(headless) or desktop (both 64bit) we should first start off with an update/upgrade.
sudo apt update && sudo apt upgrade
Once completed reboot and lets reopen.
-
Install Miniforge The community version of anaconda/miniconda that has Arm support.
- Follow the on screen prompts to install miniforge(conda).
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh
- After following the steps, confirm that you have it by opening a terminal and running:
conda -V
. The output should be something along the lines of:conda 4.9.2
-
Install git
conda install -c anaconda git
-
Install Cmake
sudo apt update sudo apt install -y cmake pip install cmake
-
Clone the Project
- Via HTTPS:
git clone https://github.com/OpenBB-finance/OpenBBTerminal.git
- via SSH:
git clone [email protected]:OpenBB-finance/OpenBBTerminal.git
- Via HTTPS:
-
Navigate into the project's folder
cd OpenBB/
-
Create Environment
You can name the environment whatever you want. Although you could use names such as:
welikethestock
,thisistheway
ordiamondhands
, we recommend something simple and intuitive likegst
. This is because this name will be used from now onwards.conda env create -n openbb python=3.9
-
Activate the virtual environment
conda activate openbb
Note: At the end, you can deactivate it with:
conda deactivate
. -
Update all poetry dependencies
poetry update --lock
Note: This is done to solve any issues with poetry dependencies for the arm architecture of the rpi
-
Install using our updated poetry installation
poetry install
-
Ready to rock on a Raspberry Pi!
python terminal.py
Note: For a headless installation using raspbian lite also follow the Jupyter Lab installation
-
Jupyter Lab (Optional. Early alpha). User the Terminal from Jupyter Lab
You can install Jupyter Lab extensions that help you manage settings and launch the terminal in a JL bash console using the commands in the jupyterlab/README.md
NOTE: When you close the terminal and re-open it, the only command you need to re-call is conda activate gst
before you call python terminal.py
again.
The project is build around several different API calls, whether it is to access historical data or financials. The table below shows the ones where a key is necessary. The easiest way is of updating the keys is by using the terminal, see this guide.
You can also use the environment variable to set your API Keys directly instead of using the Terminal, for the variable name in the code one just needs to remove the "GT_", this can be found in config_terminal.py.
Website | Environment Variables |
---|---|
Alpha Vantage | OPENBB_API_KEY_ALPHAVANTAGE |
Binance | OPENBB_API_BINANCE_KEY OPENBB_API_BINANCE_SECRET |
BitQuery | OPENBB_API_BITQUERY_KEY |
Coinbase | OPENBB_API_COINBASE_KEY OPENBB_API_COINBASE_SECRET OPENBB_API_COINBASE_PASS_PHRASE |
Coinglass | OPENBB_API_COINGLASS_KEY |
CoinMarketCap | OPENBB_API_CMC_KEY |
Cryptopanic | OPENBB_API_CRYPTO_PANIC_KEY |
DEGIRO | OPENBB_DG_USERNAME OPENBB_DG_PASSWORD OPENBB_DG_TOTP_SECRET |
Ethplorer | OPENBB_API_ETHPLORER_KEY |
Financial Modeling Prep | OPENBB_API_KEY_FINANCIALMODELINGPREP |
Finnhub | OPENBB_API_FINNHUB_KEY |
FRED | OPENBB_API_FRED_KEY |
GitHub | OPENBB_API_GITHUB_KEY |
Glassnode | OPENBB_API_GLASSNODE_KEY |
News | OPENBB_API_NEWS_TOKEN |
Oanda | OPENBB_OANDA_TOKEN OPENBB_OANDA_ACCOUNT |
Polygon | OPENBB_API_POLYGON_KEY |
Quandl | OPENBB_API_KEY_QUANDL |
OPENBB_API_REDDIT_CLIENT_ID OPENBB_API_REDDIT_CLIENT_SECRET OPENBB_API_REDDIT_USERNAME OPENBB_API_REDDIT_USER_AGENT OPENBB_API_REDDIT_PASSWORD |
|
SentimentInvestor | OPENBB_API_SENTIMENTINVESTOR_TOKEN OPENBB_API_SENTIMENTINVESTOR_KEY |
Tradier | OPENBB_TRADIER_TOKEN |
OPENBB_API_TWITTER_KEY OPENBB_API_TWITTER_SECRET_KEY OPENBB_API_TWITTER_BEARER_TOKEN |
|
Whale Alert | OPENBB_API_WHALE_ALERT_KEY |
Example:
export OPENBB_API_REDDIT_USERNAME=SexyYear
Environment variables can also be set in a .env
file at the top of the repo. This file is ignored by git so your API
keys will stay secret. The above example stored in .env
would be:
OPENBB_API_REDDIT_USERNAME=SexyYear
Note that the OPENBB_API_REDDIT_USER_AGENT
is the name of the script that you set when obtained the Reddit API key.
Note that it is not necessary to have a valid Alpha Vantage key to get daily OHLC values.