Logo

About The Project

How it started:

Gamestonk Terminal is an awesome stock and crypto market terminal that has been developed for fun, while I saw my GME
shares tanking. But hey, I like the stock πŸ’ŽπŸ™Œ.

How it’s going:

Gamestonk Terminal provides a modern Python-based integrated environment for investment research, that allows
an average joe retail trader to leverage state-of-the-art Data Science and Machine Learning technologies.

As a modern Python-based environment, GamestonkTerminal opens access to numerous Python data libraries in Data Science
(Pandas, Numpy, Scipy, Jupyter), Machine Learning (Pytorch, Tensorflow, Sklearn, Flair), and Data Acquisition
(Beautiful Soup, and numerous third-party APIs).

Getting Started

Docker Installation – new and improved

  1. First step is to make sure docker desktop is installed. Install links can be found here.
    To confirm that your docker desktop is downloaded and running, open a command prompt or terminal and enter
    docker info. If you get the following you are not running the docker desktop:

    Server:
    ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
    Is the docker daemon running?
    

    Open the docker desktop app in this case.

  2. Download the latest docker image.

    docker pull ghcr.io/gamestonkterminal/gst-poetry:latest

    Upon running this the first time, you should see the various layers downloading (note the random series of letters
    numbers will vary). The first time this is run, it will take a few minutes. Subsequent updates will be much faster,
    as the changes will be in the MB instead of GB.
    Screen Shot 2021-09-08 at 10 41 08 AM

    Once the download is complete, confirm that the image has been created by doing docker images. You should see
    something similar to

    REPOSITORY                             TAG       IMAGE ID       CREATED        SIZE
    ghcr.io/gamestonkterminal/gst-poetry   latest    e2bbeebcc73c   42 hours ago   2.02GB
    
  3. Run a container

    You are now ready to run the terminal.

    docker run -it --rm ghcr.io/gamestonkterminal/gst-poetry:latest

    This will open up the terminal in your command prompt or terminal. Note that this has provided now environment file,
    so you will not be able to view plots or use keys at this stage.

    To read more on adding the environment keys and how to configure your X-server to show plots, hop over to the
    Advanced Docker Setup.

Local Install – Anaconda and Python

If you’d like to see a video recording of the installation process, @JohnnyDankseed has made one available here.

This project supports Python 3.7, 3.8 and 3.9.

Our current recommendation is to use this project with Anaconda’s Python distribution – either full
Anaconda3 Latest or Miniconda3 Latest.
Several features in this project utilize Machine Learning. Machine Learning Python dependencies are optional.
If you decided to add Machine Learning features at a later point, you will likely have better user experience with
Anaconda’s Python distribution.

  1. Star the project

    Github starts

  2. Install Anaconda (It’s on the AUR as anaconda or miniconda3!)

  3. Install git

    conda install -c anaconda git
  4. Clone the Project

    • Via HTTPS: git clone https://github.com/GamestonkTerminal/GamestonkTerminal.git
    • via SSH: git clone [email protected]:GamestonkTerminal/GamestonkTerminal.git
  5. Navigate into the project’s folder

    cd GamestonkTerminal/
  6. Create Environment

    You can name the environment whatever you want. Although you could use names such as: welikethestock, thisistheway
    or diamondhands, we recommend something simple and intuitive like gst. This is because this name will be used
    from now onwards.

    conda env create -n gst --file build/conda/conda-3-8-env.yaml
  7. Activate the virtual environment

    conda activate gst

    Note: At the end, you can deactivate it with: conda deactivate.

  8. Install poetry dependencies

    poetry install

    If you are having trouble with Poetry (e.g. on a Windows system), simply install requirements.txt with pip

    pip install -r requirements.txt
  9. You’re ready to Gamestonk it!

    python terminal.py
  10. (Windows – Optional) Speeding up opening process in the future

    After you’ve installed Gamestonk Terminal, you’ll find a file named “Gamestonk Terminal.bat”. You can use this file
    to open Gamestonk 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.

  11. 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

Advanced User Install – Machine Learning

If you are an advanced user and use other Python distributions, we have several requirements.txt documents that you can
pick from to download project dependencies.

If you are using conda instead of build/conda/conda-3-8-env.yaml configuration file in Step 5, use build/conda/conda-3-8-env-full.

Note: The libraries specified in the requirements.txt file 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.

If you would like to use optional Machine Learning features:

ENABLE_PREDICT = os.getenv("GTFF_ENABLE_PREDICT") or True
  • Install optional ML features dependencies:

poetry install -E prediction

Update Terminal

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 gamestonk.

If you stashed your changes previously, you can un-stash them with:

git stash pop

API Keys

The project is build around several different API calls, whether it is to access historical data or financials.

These are the ones where a key is necessary:

When these are obtained, don’t forget to update config_terminal.py.

Alternatively, you can also set them to the following environment variables:

Website Variables
Alpha Vantage GT_API_KEY_ALPHAVANTAGE
Binance GT_API_BINANCE_KEY
GT_API_BINANCE_SECRET
CoinMarketCap GT_CMC_API_KEY
GT_CMC_API_KEY
DEGIRO GT_DG_USERNAME
GT_DG_PASSWORD
GT_DG_TOTP_SECRET
FRED GT_API_FRED_KEY
Financial Modeling Prep GT_API_KEY_FINANCIALMODELINGPREP
Finhub GT_API_FINNHUB_KEY
News GT_API_NEWS_TOKEN
Oanda GT_OANDA_TOKEN
GT_OANDA_ACCOUNT
Polygon GT_API_POLYGON_KEY
Quandl GT_API_KEY_QUANDL
Reddit GT_API_REDDIT_CLIENT_ID
GT_API_REDDIT_CLIENT_SECRET
GT_API_REDDIT_USERNAME
GT_API_REDDIT_USER_AGENT
GT_API_REDDIT_PASSWORD
SentimentInvestor GT_API_SENTIMENTINVESTOR_TOKEN
GT_API_SENTIMENTINVESTOR_KEY
Tradier GT_TRADIER_TOKEN
Twitter GT_API_TWITTER_KEY
GT_API_TWITTER_SECRET_KEY
GT_API_TWITTER_BEARER_TOKEN
Coinbase GT_API_COINBASE_KEY
GT_API_COINBASE_SECRET
GT_API_COINBASE_PASS_PHRASE
Whale Alert GT_API_WHALE_ALERT_KEY
Ethplorer GT_API_ETHPLORER_KEY

Example:

export GT_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:

GT_API_REDDIT_USERNAME=SexyYear

Note that the GT_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.

Usage

Start by selecting a context that you would like to work with. If you want to research stocks, you would start with

stocks

Alternatively, you can set a default context to be loaded in the config_terminal file by setting

DEFAULT_CONTEXT = "stocks"

From this menu, you can load a ticker of interest (note the -t is optional):

load -t GME

At this point, all available menus will be in full color and available to use.

To look at the candle chart of your stock, run:

candle

Slice the historical data by loading ticker and setting a starting point, e.g.

load -t GME -s 2020-06-04

To perform technical analysis, first enter the menu

ta

and run a SMA with:

sma

However, imagine that you wanted to change the length of the window because you don’t want to go long but do a swing,
and therefore a smaller window is necessary. Check what settings are available on the SMA command:

sma -h

Once that has been seen, set the parameters that you want after flagging them. In this case, to change length window
to 10, we would have to do:

sma -l 10

Example:

To return to the stocks menu to perform more research in a different menu, just use the q command. From the stocks
menu, using q again will return you to the main menu where you can enter a different context (crypto for example).

Contributing

There are 3 main ways of contributing to this project.

For a 1h coding session where the architecture of the repo is explained while a new feature is added, check https://www.youtube.com/watch?v=9BMI9cleTTg.

Become a Contributor 🦍

Recommended if you bought the dip, and the share price keeps dipping. You may as well keep yourself busy while stonks
go up.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Install the pre-commit hooks by running:
    pre-commit install.
    Any time you commit a change, linters will be run automatically. On changes, you will have to re-commit.
  4. Commit your Changes (git commit -m 'Add some AmazingFeature')
  5. Push to your Branch (git push origin feature/AmazingFeature)
  6. Open a Pull Request

Become a Karen 🀷

Recommended if you adopted a strategy of buying high and selling low.

We are interested in your view on what sort of features
would make you buy even higher and selling even lower.

Also, if somehow you’re sitting in several mils due to this terminal, don’t forget to report a
bug so that the team can fix, and keep the old ways.

Join the πŸ™Œ πŸ’Ž Gang

If red is your favorite color, and you never sell for a loss.

Welcome to the club, and feel free to support the developers behind this amazing open-source project.

License

Distributed under the MIT License. See
LICENSE for more information.

Disclaimer

“A few things I am not. I am not a cat. I am not an institutional investor, nor am I a hedge fund. I do not have
clients and I do not provide personalized investment advice for fees or commissions.” DFV

Trading in financial instruments involves high risks including the risk of losing some, or all, of your investment
amount, and may not be suitable for all investors. Before deciding to trade in financial instrument you should be fully
informed of the risks and costs associated with trading the financial markets, carefully consider your investment
objectives, level of experience, and risk appetite, and seek professional advice where needed. The data contained in GST
is not necessarily accurate. GST and any provider of the data contained in this website will not accept liability for
any loss or damage as a result of your trading, or your reliance on the information displayed.

Contacts

Didier Rodrigues Lopes[email protected]

Artem Veremy[email protected]

James Maslek[email protected]

Feel free to share loss porn, memes or any questions at:

Contributors

  • pll_llq and Chavithra: Working on JupyterLab integration. Also developed a GUI POOC.
  • jpp : Responsible by developing Crypto menu.
  • northern-64bit : Developing a discord bot for the terminal.
  • 1lluz10n and crspy : Working on our landing page https://gamestonkterminal.netlify.app.
  • Meghan Hone : Managing Twitter account.
  • Chavithra and Deel18 : for Degiro’s integration.
  • alokan : Responsible by developing Forex menu.
  • Traceabl3 : By adding several preset screeners.



Acknowledgments

GitHub

View Github