Skip to content

Latest commit

 

History

History
97 lines (64 loc) · 2.41 KB

README.md

File metadata and controls

97 lines (64 loc) · 2.41 KB

bitfront-telegram-bot

A simple Python script to notify price alerts from Bitfront on Telegram by a bot

Requirements

  • Requires Python 3.8.2+
  • Dependency: requests

Quick Start

Clone the Code

$ git clone [email protected]:Junyong-Suh/bitfront-telegram-bot.git

Setup Virtual Environment

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

Install Dependencies

$ 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

Set Your Credentials

Rename credentials_empty.py to credentials.py and set your credentials

Add your Telegram ID(s) to constants.py

(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

Subscribe to Your Bot

Turn on your Telegram App, find your bot and add.

Run the Script

python3 main.py

You will get messages from the bot

Docker

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

References

Contributions

Please make an issue and a PR :-)