A Telegram Bot for querying and monitoring the Algorand Blockchain
Report Bug
·
Request Feature
AlgoWatcher is a Telegram bot designed to allow users of the Telegram Messaging platform to query balances and monitor transactions on the Algorand blockchain. This bot is designed to monitor the flow of Planets into an Algorand Public Address and alert the user if it detects disruptions to that flow.
To get a local copy up and running follow these simple steps.
The Algorand Python SDK must be installed. This can be installed via pip3.
pip3 install py-algorand-sdk
Refer to py-algorand-sdk for alternative installation methods.
The Python Telegram Bot Package must also be installed. This can be installed via pip3.
pip3 install python-telegram-bot --upgrade
Refer to python-telegram-bot for alternative installation methods.
- Clone the repo
git clone https://github.com/avislash/algowatcher.git
- Modify algowatcher.py to have the appropriate Algorand Node Address and API Key and Telegram Bot API key. These can be either hard coded or stored in a pickle file and read into the program.
3.) Run via $python3 ./algowatcher.py
To use AlgoWatcher send a /start Telegram message to @algowatcher .
The /start command displays all the commands available to the user as well as a brief description
To get started register an Algorand Public address to query and/or monitor via /address ADDRESS
Now that the address has been set, you can use the AlgoWatcher bot to check the current number of Algo that the address has via /getAlgoBalance
AlgoWatcher can be used to get the amount of Planets (an Algorand Special Asset [ASA]) in the address as well with /getPlanetBalance
In addition to Planets, AlgoWatcher can get the amount of any valid ASA registered to the Algorand Address by using /getAssetBalance ASSET_ID
To setup Planet Monitoring use the /startPlanetMonitor command.
When no inputs are supplied to the /startPlanetMonitor command then the last set interval is used (note: The default interval is 2 minutes and is set when using the /address command).
To change the interval use
/startPlanetMonitor INTERVALs to specify the interval in seconds or
/startPlanetMonitor INTERVALm to specify the interval in minutes
Note: The Planet Monitor only accepts inputs of seconds and minutes at this time since that covers the frequency range of how quickly Planets are issued to Algorand Accounts by PlanetWatch. The bot can be updated to accommodate input of hours and days as well should the community decide it.
Once started the Planet Monitor will alert the user at the specified interval if it does not detect any new Planets coming in.
To stop the Planet monitor use /stopPlanetMonitor
After stopping the Planet Monitor, the /startPlanetMonitor command can be used at any time to start the Planet Monitor back up either at the last set interval or a newly specified one. The monitoring interval can also be changed at any time without needing to stop monitor.
The /getMonitorStatus command can be used to check the state of the Planet Monitor at any time
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
See LICENSE
for more information.
Avi Misra - | Email: [email protected] | Telegram Handle: @avislash |
AlgoWatcher Bot Telegram Handle - @AlgoWatcher
AlgoWatcher Telegram Group - @AlgoWatchers
Project Link: https://github.com/avislash/algowatcher
-
- Workspace Setup - This provides a great introduction and overview of the Algorand Developer Tools and Workspace
- Hello World Transaction - This is provides a great example (in many languages) of how to do a transaction on the Algorand Network
-
- Great overview of the Python Telegram Bot SDK and provides a great overview of how to register a Bot in Telegram and hook it in with the Python Telegram Bot SDK.
-
Best ReadME Template - Where this README template was taken from. It really is the best template!