mirror of
https://gitlab.com/simple-stock-bots/simple-stock-bot.git
synced 2025-06-16 15:17:28 +00:00
Merge branch 'Features' of https://gitlab.com/MisterBiggs/simple-telegram-bot into Features
This commit is contained in:
commit
c1030d0956
@ -7,8 +7,9 @@ before_script:
|
||||
|
||||
pages:
|
||||
script:
|
||||
- cd ./web
|
||||
- mkdocs build
|
||||
- mv site public
|
||||
- mv site ../public
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Anson Biggs
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
20
README.md
20
README.md
@ -1,21 +1,5 @@
|
||||
# simple-telegram-bot
|
||||
|
||||
## Docker Instructions
|
||||
## A Telegram Bot for stock market Data.
|
||||
|
||||
Build the Image
|
||||
|
||||
```powershell
|
||||
docker build -t stockbot .
|
||||
```
|
||||
|
||||
Run The image
|
||||
|
||||
```powershell
|
||||
docker run -it --rm --name stockbot stockbot
|
||||
```
|
||||
|
||||
Or run the Image headless
|
||||
|
||||
```powershell
|
||||
docker run -it --rm --detatch --name stockbot stockbot
|
||||
```
|
||||
## Full documentation [here.](https://misterbiggs.gitlab.io/simple-telegram-bot)
|
@ -1,6 +1,5 @@
|
||||
import urllib.request
|
||||
import json
|
||||
import feedparser
|
||||
from datetime import datetime
|
||||
import time
|
||||
|
||||
|
@ -16,7 +16,7 @@ I wonder how $aapl, $nflx, and $sono are performing today.
|
||||
|
||||
Will return:
|
||||
|
||||

|
||||

|
||||
|
||||
## Commands
|
||||
|
||||
|
@ -2,9 +2,11 @@
|
||||
|
||||
## About
|
||||
|
||||
If you aren't already, you can talk to this bot here: **[http://t.me/SimpleStockBot](http://t.me/SimpleStockBot)**
|
||||
|
||||
Simple Stock Bot is a bot for [Telegram](https://telegram.org/) that provides information about the stock market. You can view the source code [here.](https://gitlab.com/MisterBiggs/simple-telegram-bot). You can also build your own docker container to run [here.](#Build)
|
||||
|
||||
*Coded with ❤ by [@MisterBiggs](https://gitlab.com/MisterBiggs)*
|
||||
_Coded with ❤ by [@MisterBiggs](https://gitlab.com/MisterBiggs)_
|
||||
|
||||
## Getting a Stock Quote
|
||||
|
||||
@ -22,14 +24,15 @@ I wonder how $aapl, $nflx, and $sono are performing today.
|
||||
|
||||
Will return:
|
||||
|
||||

|
||||

|
||||
|
||||
As long as the bot is in your chat it will reply to any stock tickers in your messages.
|
||||
|
||||
## Commands
|
||||
|
||||
* [`/help`](#/help) - Create a new project.
|
||||
* [`/news`](#/news) - Start the live-reloading docs server.
|
||||
- [`/help`](#/help)
|
||||
- [`/news`](#/news)
|
||||
- [`/dividend`](#/dividend)
|
||||
|
||||
### /help
|
||||
|
||||
@ -37,30 +40,43 @@ This command just displays a short description of what the bot does and a link t
|
||||
|
||||
### /news
|
||||
|
||||
This command is intelligent enough to get any tickers in the ticker format: `$amzn`, and can handle as many tickers as you would like to enter. The bot will then return the price of the ticker, and links various websites that provide news about the ticker. Currently for Apple stock the Bot would return:
|
||||
This command is intelligent enough to get any tickers in the ticker format: `$amzn`, and can handle as many tickers as you would like to enter. The bot will then return the price of the ticker, and links various websites that provide news about the ticker. Currently the command `/news $aapl` returns:
|
||||
|
||||
---
|
||||
|
||||
`The current stock price of Apple Inc. is **$174.18**, the stock is currently up **1.71%**`
|
||||
[`Bravos`](https://bravos.co/AAPL)
|
||||
[`Seeking Alpha`](https://seekingalpha.com/symbol/AAPL)
|
||||
[`MSN Money`](https://www.msn.com/en-us/money/stockdetails?symbol=AAPL)
|
||||
[`Yahoo Finance`](https://finance.yahoo.com/quote/AAPL)
|
||||
[`Wall Street Journal`](https://quotes.wsj.com/AAPL)
|
||||
[`The Street`](https://www.thestreet.com/quote/AAPL.html)
|
||||
[`Zacks`](https://www.zacks.com/stock/quote/AAPL)
|
||||
`The current stock price of Apple Inc. is $**170.89**, the stock is currently **up 0.86%**`
|
||||
|
||||
*The /news command needs updating, feel free to [open an issue](https://gitlab.com/MisterBiggs/simple-telegram-bot/issues) with suggestions.*
|
||||
[`Apple: The 4 Biggest Risks`](https://api.iextrading.com/1.0/stock/aapl/article/7171544094325661)
|
||||
|
||||
## Run your own Bot
|
||||
[`Apple is getting so serious about health, it's started hosting heart-health events at Apple Stores`](https://api.iextrading.com/1.0/stock/aapl/article/6966979968162641)
|
||||
|
||||
[`You can now ask Siri to get you directions with Waze so you don't even have to open the app`](https://api.iextrading.com/1.0/stock/aapl/article/7672481171984085)
|
||||
|
||||
---
|
||||
|
||||
### /dividend
|
||||
|
||||
The dividend command will give you the `dividend yield`, `dividend rate`, and will tell you how long until the payout date for any tickers input. Currently the command `/dividend $psec` returns:
|
||||
|
||||
---
|
||||
|
||||
`Prospect Capital Corporation current dividend yield is: 0.720%, or $11.285 per share.`
|
||||
|
||||
`The dividend is in: 14 Days 1 Hours 54 Minutes 46 Seconds.`
|
||||
|
||||
---
|
||||
|
||||
## Run your own bot using latest build
|
||||
|
||||
```powershell
|
||||
docker run --detach registry.gitlab.com/misterbiggs/simple-telegram-bot:latest
|
||||
```
|
||||
|
||||
## Built and Run your own Bot
|
||||
|
||||
You can also run your own bot super easily in a [Docker](https://hub.docker.com/) Container.
|
||||
|
||||
1. Download the repository.
|
||||
2. Change information in [Credentials.py]() with your own Telegram Bot key, which can be found [here.]()
|
||||
3. Navigate to /bot directory in Powershell
|
||||
4. Build an image of the bot:
|
||||
`docker build -t stockbot .`
|
||||
5. Run the image:
|
||||
`docker run -it --rm --detatch --name stockbot stockbot`
|
||||
6. Or you can run the image headless:
|
||||
`docker run -it --rm --detatch --name stockbot stockbot`
|
||||
3. Run stockBot.py
|
||||
4. profit???
|
||||
|
@ -1,11 +1,13 @@
|
||||
site_name: Simple Stock Bot
|
||||
site_url: https://misterbiggs.gitlab.io/simple-telegram-bot
|
||||
edit_uri: blob/master/web/docs/
|
||||
nav:
|
||||
- Home: index.md
|
||||
# - Commands: commands.md
|
||||
# - About: about.md
|
||||
# - Author's Website: https://blog.ansonbiggs.com/
|
||||
- LICENSE: LICENSE.md
|
||||
theme: 'material'
|
||||
theme: "material"
|
||||
|
||||
repo_url: https://gitlab.com/MisterBiggs/simple-telegram-bot
|
||||
repo_name: Simple Telegram Bot
|
||||
|
Loading…
x
Reference in New Issue
Block a user