Retrieve stock exchange information right at your fingertips
- Introduction
- Getting started
- Usage
- Custom keyboard
- Database
This bot is made to retrieve stock exchange information with a simple command.
Currently supported websites:
- Python 3.9.7 is recommended.
Clone the repository with:
$ git clone https://github.com/FPSUsername/ISIN_Tracker_Bot
$ cd ISIN_Tracker_Bot
- Create virtual environment
python3 -m venv venv
- Activate the virtual environment
source venv/bin/activate
- Install required packages
pip install -r requirements.txt
- Login to your Telegram account with the phone number of the developer account to use.
- Click under API Development tools.
- A Create new application window will appear. Fill in your application details. There is no need to enter any URL, and only the first two fields (App title and Short name) can currently be changed later.
- Click on Create application at the end. Remember that your API hash is secret and Telegram won’t let you revoke it. Don’t post it anywhere!
- Create a bot with BotFather and click on API Token. Remember that your API Token is secret. In case it get leaked, revoke the API Token.
Create a file named credentials.json
and place your credentials inside as:
{
"API_ID": YOUR_API_ID,
"API_HASH": "YOUR_API_HASH",
"TOKEN": "YOUR_API_TOKEN",
"NAME": "APPLICATION_NAME"
}
$ cd src
$ python main.py
Create isin_tracker_bot.service
in /etc/systemd/services/
and modify the path, user and group accordingly:
[Unit]
Description=Telegram bot - ISIN Tracker
Wants=network.target
After=syslog.target network-online.target
[Service]
Type=simple
User=USERNAME
Group=USERNAME
WorkingDirectory=/path/to/repository
ExecStart=/path/to/repository/venv/bin/python /path/to/repository/src/main.py
Restart=on-failure
RestartSec=10
KillMode=process
StandardOutput=syslog
StandardError=syslog
[Install]
WantedBy=multi-user.target
Enable and start the service:
$ sudo systemctl enable isin_tracker_bot.service
$ sudo systemctl start isin_tracker_bot.service
The keyboard has four functions listed below.
After pressing the track button, you'll be greeted by a message asking for any ISIN that's currently available on the website of ING. Sending an ISIN will add the sprinter to your account's list.
The list button simply lists all your added sprinters, showing all the useful information about the sprinter. It also shows the link to the ISIN and the market itself. If you have more than 4 sprinters added, the results will be paged.
In order to remove a sprinter from your list, you can simply tap any sprinter in the shown list after pressing the remove button and press the confirm button afterwards.
The settings allow you to display or hide ISIN, Bied, Laat, %1 dag, Hefboom, Stop loss-niveau and Referentie. By default everything is enabled.
The database works as following.
Sprinters
- Add other websites such as PNB Paribas
Project
- Set all logging entries to their correct value (info, warning, debug)
- Cleanup code
- Structurize
- Readme/Wiki pages
- Language files support