A simple Python script to notify price alerts from Bitfront on Telegram by a bot
- Requires Python 3.8.2+
- Dependency: requests
$ git clone [email protected]:Junyong-Suh/bitfront-telegram-bot.git
Install pip
and virtualenv
// install pip
$ curl https://bootstrap.pypa.io/get-pip.py > getpip.py
$ sudo python getpip.py
// install virtualenv
$ sudo pip install virtualenv
$ cd bitfront-telegram-bot
$ virtualenv -p python3.8.2 .venv
$ source .venv/bin/activate
$ python3 --version
Python 3.8.2
$ pip3 install -r requirements.txt
Rename credentials_empty.py
to credentials.py
and set your credentials
- How to get your own Telegram Bot and the ID: https://core.telegram.org/bots
Add your Telegram ID(s) to constants.py
- How to get your Telegram ID: https://support.bigone.com/hc/en-us/articles/360008014894-How-to-get-the-Telegram-user-ID-
(Optional) Once you update your credentials, make Git not to track the file
# untrack
$ git update-index --assume-unchanged confidentials.py
# track again
# git update-index --no-assume-unchanged confidentials.py
Turn on your Telegram App, find your bot and add.
python3 main.py
You will get messages from the bot
Assume that you set the credentials and subscribed to your bot.
- Build the image
docker build -t bitfront-price-alert .
- Run
docker run bitfront-price-alert:latest
- https://core.telegram.org/bots/api#making-requests
- https://core.telegram.org/bots/api#message
- https://github.com/bitfront-exchange/bitfront-api-docs
- https://bitfront-exchange.github.io/bitfront-api-docs/#/api/market/v1-market-public-currentTickValue-get
Please make an issue and a PR :-)