1
0
mirror of https://gitlab.com/simple-stock-bots/docs.git synced 2025-06-16 15:17:27 +00:00

full revamp of docs

This commit is contained in:
Anson 2020-06-12 02:46:17 -07:00
parent 8a9495b654
commit fe1ff6eac8
4 changed files with 70 additions and 314 deletions

View File

@ -1,153 +0,0 @@
<p align="center">
<a href="" rel="noopener">
<img width=200px height=200px src="https://assets.gitlab-static.net/uploads/-/system/project/avatar/10273693/logo.jpg" alt="Simple Discord Stock Bot"></a>
</p>
<h3 align="center">Simple Discord Stock Bot</h3>
<div align="center">
[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![Platform](https://img.shields.io/badge/platform-Discord-blue.svg)](https://discordapp.com/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)
</div>
---
<p align="center"> Discord Bot 🤖 that provides Stock Market information.
<br>
</p>
## 📝 Table of Contents
+ [About](#about)
+ [How it works](#working)
+ [Usage](#usage)
+ [Getting Started](#getting_started)
+ [Deploying your own bot](#deployment)
+ [Built Using](#built_using)
+ [Contributing](../CONTRIBUTING.md)
+ [author](#author)
+ [Acknowledgments](#acknowledgement)
## 🧐 About <a name = "about"></a>
This bot aims to be as simple as possible while providing all the information you need on the stock market. The motivation of this bot is to provide similar stock market functionality that the Google Assistant provided in [Google Allo](https://gcemetery.co/google-allo/) before the project was sunset.
## 💭 How it works <a name = "working"></a>
This bot works by using the [IEX API 2.0](https://iexcloud.io/docs/api/). Using various endpoints provided by the API, the bot can take either take commands from users or check any messages for stock symbols as detailed in [Usage](#usage).
## 🎈 Usage <a name = "usage"></a>
### Basic Usage
The simplest way to use the bot is just by sending a message either as a direct message or in a group chat with the bot active. The bot will search every message for text with a dollar sign followed by a stock symbol, and it will return the full name of the company and the current trading price.
```
$tsla
```
The symbols can be anywhere in the message, and you can post as many as you like so commands such as:
```
I wonder if $aapl is down as much as $msft is today.
```
would return the stock price of both Apple and Microsoft like so:
```
The current stock price of Microsoft Corp. is $131.4, the stock is currently up 2.8%
The current stock price of Apple, Inc. is $190.15, the stock is currently up 2.66%
```
### /dividend
To get information about the dividend of a stock type `/dividend` followed by any text that has symbols with a dollar sign in front of them. So, the following command:
```
/dividend $psec
```
Would return information about Prospect Capitals dividend:
```
Prospect Capital Corp. Declares June 2019 Dividend of $0.06 Per Share
The dividend is in: 38 Days 3 Hours 53 Minutes 22 Seconds.
```
💡 you can also call the dividend command using /div
### /news
To get the latest news about a stock symbol use `/news` followed by any text that has symbols with a dollar sign in front of them. So, the following command:
```
/news $psec
```
Would return news for Prospect Capital:
News for PSEC:
[Yield-Starved Investors Still Accumulating BDCs Paying More Than 10% Annually](https://cloud.iexapis.com/v1/news/article/d994b8b5-9fbf-4ceb-afbe-e6defcfc6352)
[Assessing Main Street Capital's Results For Q1 2019 (Includes Updated Price Target And Investment Ratings Analysis)](https://cloud.iexapis.com/v1/news/article/e60899bc-5230-4388-a609-fc2b8736a7d4)
[Fully Assessing Prospect Capital's Fiscal Q3 2019 (Includes Current Recommendation And Price Target)](https://cloud.iexapis.com/v1/news/article/08881160-72c5-4f5d-885b-1751187d24eb)
### /info
To get information about a stock type `/info` followed by any text that has symbols with a dollar sign in front of them. So, the following command:
```
/info $psec
```
Would return information about Prospect Capitals:
Company Name: [Prospect Capital Corp.](http://www.prospectstreet.com/)
Industry: Investment Managers
Sector: Finance
CEO: John Francis Barry
Description: Prospect Capital Corp. is a business development company, which engages in lending to and investing in private businesses. It also involves in generating current income and long-term capital appreciation through debt and equity investments. The company was founded on April 13, 2004 and is headquartered in New York, NY.
## 🏁 Getting Started <a name = "getting_started"></a>
You can either choose to use the hosted version of the bot by [clicking here](https://discordapp.com/oauth2/authorize?client_id=532045200823025666&permissions=2048&scope=bot) or you can host your own bot with the instructions below.
### Self Hosted Bot
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See [deployment](#deployment) for notes on how to deploy the project on a live system.
### Prerequisites
This project runs neatly in a docker container, so all that you need to run it yourself is [Docker](https://hub.docker.com/?overlay=onboarding) installed on your system.
You will also need a Discord API key which can be obtained [here.](https://discordapp.com/developers/)
Finally, you will need and IEX Cloud API key. They offer a free tier that should be enough for any private groups, more details [here.](https://iexcloud.io/)
### Installing
Once Docker is installed and you have your API keys for Discord and IEX Cloud getting the bot running on any platform is extremely easy.
Download or clone the repository to your machine and open a terminal in the project and build the Docker container.
```
docker build -t simple-discord-bot .
```
Then run the bot using your API keys.
```
docker run --detach \
-e discord=DISCORD_TOKEN \
-e IEX=IEX_TOKEN \
simple-discord-bot
```
Your bot should be running! If you are new to Docker, I would recommend checking out its documentation for full control over your bot.
## 🚀 Deploying your own bot <a name = "deployment"></a>
I recommend Digital Ocean for small projects like this because it is straightforward to use and affordable. [Sign up with my referral code, and we both get some free hosting.](https://m.do.co/c/6b5df7ef55b6)
## ⛏️ Built Using <a name = "built_using"></a>
+ [discord.py](https://github.com/Rapptz/discord.py) - Python Discord API Wrapper
+ [Digital Ocean](https://www.digitalocean.com/) - IaaS hosting platform
## ✍️ author <a name = "author"></a>
+ [Anson Biggs](https://blog.ansonbiggs.com/author/anson/) - The one and only
## 🎉 Acknowledgements <a name = "acknowledgement"></a>
+ Discord for having a great bot API
+ IEX Cloud for offering a free tier
+ Viewers like you ♥

View File

@ -6,22 +6,85 @@
[![Platform](https://img.shields.io/badge/platform-Discord-blue.svg)](https://discordapp.com/api/oauth2/authorize?client_id=532045200823025666&permissions=0&scope=bot) [![Platform](https://img.shields.io/badge/platform-Discord-blue.svg)](https://discordapp.com/api/oauth2/authorize?client_id=532045200823025666&permissions=0&scope=bot)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://tldrlegal.com/license/mit-license#summary) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://tldrlegal.com/license/mit-license#summary)
---
## About ## About
Simple Stock Bots is a family of messaging bots that aim to provide simple bots that provide information on the stock market. Currently there are only [Telegram](./telegram) and [Discord](./discord) Bots. Simple Stock Bots is a family of messaging bots that aim to provide simple interface to stock market information. Currently there are only Telegram and Discord Bots.
## Getting Started ## Getting Started
The simplest way to use these bots is to use the version that I host on Digital Ocean. You can find the links to access them below: The bots can either be added to a server or can be direct messaged for the exact same functionality. Links for each platform are below:
- [Telegram](https://t.me/SimpleStockBot) - [Telegram](https://t.me/SimpleStockBot)
- [Discord](https://discordapp.com/oauth2/authorize?client_id=532045200823025666&permissions=2048&scope=bot) - [Discord](https://discordapp.com/oauth2/authorize?client_id=532045200823025666&permissions=2048&scope=bot)
Alternatively, this project is completely open source and instructions on how to run your own instance of the bot are provided on each of the bots pages. Alternatively, this project is completely open source and instructions on how to run your own instance of the bot are provided on each of the bots pages.
## Usage
The bots are nearly identical between platforms, but sometimes a platform will have a feature that only it supports such as Telegrams inline messaging or Discords embeds.
Thanks for using this bot, consider supporting it by [buying me a beer.](https://www.buymeacoffee.com/Anson)
Full documentation can be found [here.](https://simple-stock-bots.gitlab.io/site/telegram/)
### Automatic
Anytime the Bot is in your chat it will search all chats for `$` followed by a ticker. For example `$tsla` will return the following message for Tesla Motors:
```
The current stock price of Tesla Inc. is $321.35, the stock is currently up 2.7%
```
This works no matter where the ticker is in the message and you can have as many tickers as you want in the same message. For example:
```
I wonder how $aapl, $nflx, and $sono are performing today.
```
Will return:
![Conversation With Simple Telegram Bot](img\telegramBotTickerReply.png)
### Universal Commands
- /dividend `$[symbol]` will return dividend information for the symbol.
- /news `$[symbol]` will return news about the symbol.
- /info `$[symbol]` will return general information about the symbol.
- /search `query` Takes a search string, whether a company name or ticker and returns a list of companies that are supported by the bot.
### Telegram Inline Messaging
You can type @SimpleStockBot `[search]` in any chat or direct message to search for the stock bots full list of stock symbols and return the price of the ticker.
---
## Support the Project / Me
If you appreciate these bots please consider donating or contributing in another way so that they can remain free, and so that I can continue to post free things on the world wide web.
### Ways to help:
- [_"buy me a coffee"_](https://www.buymeacoffee.com/Anson)
- Use my referral links when hosting your own bot. [DigitalOcean](https://m.do.co/c/6b5df7ef55b6) or [IEX Cloud](https://iexcloud.io/s/62c8503e)
- Follow me on [twitter](https://twitter.com/Anson_3D)
- Contribute to the project on [GitLab](https://gitlab.com/simple-stock-bots) or just leave a star
## Help the bot isn't working! / I have an amazing feature that you should totally add!
Feel free to reach out at any of the following places:
- Run the `/help` command and try to figure it out yourself.
- Open an issue on gitlab: [`Telegram Bot`](https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot) [`Discord Bot`](https://gitlab.com/simple-stock-bots/simple-discord-stock-bot)
- Message me on [Telegram](https://t.me/MisterBiggs)
- Message me on Discord `MisterBiggs#0465`
- Assume someone else is already messaging me
- [Send a Carrier Pigeon 🕊 \(Twitter\)](https://twitter.com/Anson_3D)
## Source Code ## Source Code
The source code for the bots is completely open and hosted on GitLab. The source code for the bots is completely open and hosted on GitLab. The project is licensed with an MIT License which is incredibly permissive. The full text of the license can be read [here](./LICENSE)
- [Telegram](https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot) - [Telegram](https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot)
- [Discord](https://gitlab.com/simple-stock-bots/simple-discord-stock-bot) - [Discord](https://gitlab.com/simple-stock-bots/simple-discord-stock-bot)
@ -31,4 +94,4 @@ If you decide to host your own bots using my source code please consider using m
- [DigitalOcean](https://m.do.co/c/6b5df7ef55b6) - [DigitalOcean](https://m.do.co/c/6b5df7ef55b6)
- [IEX Cloud](https://iexcloud.io/s/62c8503e) - [IEX Cloud](https://iexcloud.io/s/62c8503e)
[All market data is provided by IEX Cloud](https://iexcloud.io) <script data-name="BMC-Widget" src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js" data-id="Anson" data-description="Support me on Buy me a coffee!" data-message="Thank you for using my bots!" data-color="#5F7FFF" data-position="right" data-x_margin="18" data-y_margin="18"></script>

View File

@ -1,153 +0,0 @@
<p align="center">
<a href="" rel="noopener">
<img width=200px height=200px src="https://assets.gitlab-static.net/uploads/-/system/project/avatar/10295651/TelegramLogo.jpg?width=64" alt="Simple Telegram Stock Bot"></a>
</p>
<h3 align="center">Simple Telegram Stock Bot</h3>
<div align="center">
[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![Platform](https://img.shields.io/badge/platform-Telegram-blue.svg)]()
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)
</div>
---
<p align="center"> Telegram Bot 🤖 that provides Stock Market information.
<br>
</p>
## 📝 Table of Contents
+ [About](#about)
+ [How it works](#working)
+ [Usage](#usage)
+ [Getting Started](#getting_started)
+ [Deploying your own bot](#deployment)
+ [Built Using](#built_using)
+ [Contributing](../CONTRIBUTING.md)
+ [author](#author)
+ [Acknowledgments](#acknowledgement)
## 🧐 About <a name = "about"></a>
This bot aims to be as simple as possible while providing all the information you need on the stock market. The motivation of this bot is to provide similar stock market functionality that the Google Assistant provided in [Google Allo](https://gcemetery.co/google-allo/) before the project was sunset.
## 💭 How it works <a name = "working"></a>
This bot works by using the [IEX API 2.0](https://iexcloud.io/docs/api/). Using various endpoints provided by the API, the bot can take either take commands from users or check any messages for stock symbols as detailed in [Usage](#usage).
## 🎈 Usage <a name = "usage"></a>
### Basic Usage
The simplest way to use the bot is just by sending a message either as a direct message or in a group chat with the bot active. The bot will search every message for text with a dollar sign followed by a stock symbol, and it will return the full name of the company and the current trading price.
```
$tsla
```
The symbols can be anywhere in the message, and you can post as many as you like so commands such as:
```
I wonder if $aapl is down as much as $msft is today.
```
would return the stock price of both Apple and Microsoft like so:
```
The current stock price of Microsoft Corp. is $131.4, the stock is currently up 2.8%
The current stock price of Apple, Inc. is $190.15, the stock is currently up 2.66%
```
### /dividend
To get information about the dividend of a stock type `/dividend` followed by any text that has symbols with a dollar sign in front of them. So, the following command:
```
/dividend $psec
```
Would return information about Prospect Capitals dividend:
```
Prospect Capital Corp. Declares June 2019 Dividend of $0.06 Per Share
The dividend is in: 38 Days 3 Hours 53 Minutes 22 Seconds.
```
💡 you can also call the dividend command using /div
### /news
To get the latest news about a stock symbol use `/news` followed by any text that has symbols with a dollar sign in front of them. So, the following command:
```
/news $psec
```
Would return news for Prospect Capital:
News for PSEC:
[Yield-Starved Investors Still Accumulating BDCs Paying More Than 10% Annually](https://cloud.iexapis.com/v1/news/article/d994b8b5-9fbf-4ceb-afbe-e6defcfc6352)
[Assessing Main Street Capital's Results For Q1 2019 (Includes Updated Price Target And Investment Ratings Analysis)](https://cloud.iexapis.com/v1/news/article/e60899bc-5230-4388-a609-fc2b8736a7d4)
[Fully Assessing Prospect Capital's Fiscal Q3 2019 (Includes Current Recommendation And Price Target)](https://cloud.iexapis.com/v1/news/article/08881160-72c5-4f5d-885b-1751187d24eb)
### /info
To get information about a stock type `/info` followed by any text that has symbols with a dollar sign in front of them. So, the following command:
```
/info $psec
```
Would return information about Prospect Capitals:
Company Name: [Prospect Capital Corp.](http://www.prospectstreet.com/)
Industry: Investment Managers
Sector: Finance
CEO: John Francis Barry
Description: Prospect Capital Corp. is a business development company, which engages in lending to and investing in private businesses. It also involves in generating current income and long-term capital appreciation through debt and equity investments. The company was founded on April 13, 2004 and is headquartered in New York, NY.
## 🏁 Getting Started <a name = "getting_started"></a>
You can either choose to use the hosted version of the bot by [clicking here](https://t.me/SimpleStockBot) or you can host your own bot with the instructions below.
### Self Hosted Bot
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See [deployment](#deployment) for notes on how to deploy the project on a live system.
### Prerequisites
This project runs neatly in a docker container, so all that you need to run it yourself is [Docker](https://hub.docker.com/?overlay=onboarding) installed on your system.
You will also need a telegram API key which can be obtained for free by talking to [BotFather](https://telegram.me/botfather), more details [here.](https://core.telegram.org/bots#3-how-do-i-create-a-bot)
Finally, you will need and IEX Cloud API key. They offer a free tier that should be enough for any private groups, more details [here.](https://iexcloud.io/)
### Installing
Once Docker is installed and you have your API keys for Telegram and IEX Cloud getting the bot running on any platform is extremely easy.
Download or clone the repository to your machine and open a terminal in the project and build the Docker container.
```
docker build -t simple-telegram-bot .
```
Then run the bot using your API keys.
```
docker run --detach \
-e TELEGRAM=TELEGRAM_API \
-e IEX=IEX_API \
simple-telegram-bot
```
Your bot should be running! If you are new to Docker, I would recommend checking out its documentation for full control over your bot.
## 🚀 Deploying your own bot <a name = "deployment"></a>
I recommend Digital Ocean for small projects like this because it is straightforward to use and affordable. [Sign up with my referral code, and we both get some free hosting.](https://m.do.co/c/6b5df7ef55b6)
## ⛏️ Built Using <a name = "built_using"></a>
+ [python-telegram-bot](https://python-telegram-bot.org/) - Python Telegram API Wrapper
+ [Digital Ocean](https://www.digitalocean.com/) - IaaS hosting platform
## ✍️ author <a name = "author"></a>
+ [Anson Biggs](https://blog.ansonbiggs.com/author/anson/) - The one and only
## 🎉 Acknowledgements <a name = "acknowledgement"></a>
+ Telegram for having a great bot API
+ IEX Cloud for offering a free tier
+ Viewers like you ♥

View File

@ -3,9 +3,6 @@ site_url: https://simple-stock-bots.gitlab.io/site
edit_uri: /simple-stock-bots/site/tree/master/docs edit_uri: /simple-stock-bots/site/tree/master/docs
nav: nav:
- Home: index.md - Home: index.md
# - Telegram: telegram.md
# - Discord: discord.md
- Commands: commands.md
- Author's Website: https://blog.ansonbiggs.com/ - Author's Website: https://blog.ansonbiggs.com/
- Contact (Email): mailto:anson@ansonbiggs.com - Contact (Email): mailto:anson@ansonbiggs.com
- LICENSE: LICENSE.md - LICENSE: LICENSE.md
@ -13,4 +10,6 @@ theme: "material"
repo_url: https://gitlab.com/simple-stock-bots repo_url: https://gitlab.com/simple-stock-bots
repo_name: Simple Stock Bots repo_name: Simple Stock Bots
site_description: A collection of simple chat bots for stock market Data. site_description: A collection of simple chat bots for Stock Market Data.
site_author: Anson Biggs
copyright: <a href="https://ansonbiggs.com">Anson Biggs</a> 2018 </br> <a href="https://iexcloud.io">All market data is provided by IEX Cloud</a>