Skip to content

Latest commit

 

History

History
33 lines (30 loc) · 1.66 KB

README.md

File metadata and controls

33 lines (30 loc) · 1.66 KB

telegramstatusbot

Description

This code is designed to create a telegram message every day with a masternodeoverview of the current running and minting masternodes and some daily statistics. For this purpose some masternodepool APIs are collected and merged together with a current list of masternodes of the defichain and then compared to the state of the masternodes 24h ago. Every run of the code stores the current state to the local memory.

Example telegram message

Count masternodes
24h blocks (mean searchtime)
------------------
total 8319
7688 ( 1.1 days)
------------------
cakedefi 7350
6829 ( 1.1 days)
community 846
742 ( 1.1 days)
mydeficha 120
117 ( 1.0 days)
Nodehub 3
n/a ( inf days)
------------------

Installation

  1. Install python3.9sudo apt-get install python3.9
  2. Download the sourcecode to your working directory wget https://github.com/bernd-mack/telegramstatusbot/archive/refs/tags/0.1.tar.gz
  3. Install the required modules for python requirements.txt pip install -r requirements.txt
  4. Set up your telegram Bot with @BotFather https://core.telegram.org/bots
  5. Edit the credentials.py with your Bot Token and ChatID
  6. Set up cronjob (crontab -e) to run the python code every 24h 5min until midnight
    55 23 * * * /usr/local/bin/python3.9 /home/username/statusbot.py

Contact

www.mydeficha.in
https://t.me/mydefichain