Skip to content

d-stoll/stonkmaster

Repository files navigation


The Stonk Master 📈💎🙌

Simple bot to monitor stocks, options and cryptos.

Build status License Top language discord.py Code quality

OverviewInstallationFeaturesConfigurationLicense

Overview

The Stonk Master is a Discord bot for fellow apes to monitor stonks without leaving their gaming habitat. It presents information about stonks in a very easy and simple way.

Installation

The installation is only tested on Ubuntu 20.04 LTS, however other operating systems should also work without any problem.

Make sure Python 3.8 (or higher) and pip are installed on your system. Then simply run:

pip install stonkmaster

(Optional) Some commands access the alpha vantage API, so they are only usable if an API key is defined. You can claim your free personal api key here. It takes only a minute and there are no payment methods required.

export ALPHA_VANTAGE_TOKEN=<YOUR_PERSONAL_ALPHA_VANTAGE_KEY>

It is necessary to obtain your personal discord token and define it as an environment variable before starting the bot.

export DISCORD_TOKEN=<YOUR_PERSONAL_DISCORD_TOKEN>

To start the bot, simply run the stonkmaster executable:

stonkmaster

Features

The main functionality of the bot is to query data from financial APIs and make it quickly accessible to users via a simple interface. For this purpose, we have developed a collection of commands that you can use.

Commands

  • $price [ticker] -> Shows the current price of the stonk, as well as its daily change.
  • $shorts [ticker] -> Provides currently known information on how heavily the stonk is shorted.
  • $sec [ticker] [filing-type] -> Fetches the latest SEC company filings from EDGAR.
  • $watch [ticker] -> Displays the price and change of a ticker in the bot status.
  • $wiki [keywords...] -> Searches investopedia for a definition of the keyword.

Following commands access the alpha vantage API, so a valid API key must be set up:

  • $chart [ticker] [range] -> Generates a chart showing the price development of the ticker over. The range can be specified in days (d), months (m) or years (y).

In future releases we also plan to implement the following commands:

  • $options [ticker] -> Displays options and their greeks of a specified ticker.
  • $config [key] [value] -> Changes the configuration of the bot (for example the emotes).
  • $watchlist [ticker] -> Adds a ticker to your personal watchlist. The bot will inform you about movements in your stocks.
  • $ipos -> Shows all IPOs that are likely to take place in the next 2 weeks.
  • $earnings -> Shows all company earnings expected in the next 2 weeks.
  • $fundamentals [ticker] -> Displays the fundamental data points of a company.

The list of commands is continuously being expanded. If you find bugs or want to suggest improvements, do not hesitate to make a pull request.

Configuration

You can create your own configuration file to customize emotes and texts. First copy the default configuration from config/default.ini into a custom configuration file:

wget -O custom.ini https://raw.githubusercontent.com/d-stoll/stonkmaster/master/stonkmaster/config/default.ini

Now change all configurations to git your own setup:

vim custom.ini

Finally, run the bot with your personal configuration:

stonkmaster --config custom.ini

License

Licensed under the Apache License, Version 2.0 (the "License"); You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.