Telegram bot for real-time monitoring of TON, USDT, and FREENET cryptocurrency rates.
The bot automatically sends current cryptocurrency rates to a specified chat or channel at a set interval. It displays prices in USD and RUB, as well as percentage changes.
- Monitoring of TON/USDT, USDT/RUB, and FREENET/USDT rates
- Conversion to rubles
- Tracking of percentage rate changes
- Customizable update interval
- Custom signature with link support
- Python 3.7+
- Telegram bot (created via @BotFather)
- Telegram chat or channel ID
- Clone the repository:
git clone https://github.com/justyay/TGCryptoInfo.git
cd TGCryptoInfo- Install dependencies:
pip install -r requirements.txt- Create an
.envfile in the project root directory and fill it with the following data:
TELEGRAM_BOT_TOKEN=your_bot_token
CHAT_ID=chat_identifier
CUSTOM_SIGNATURE=[BINGX](https://bingx.com/partner/TONFREENET/) | [TonTradingBot](https://t.me/tontrade?start=XsDjLHUq)
UPDATE_INTERVAL=5
| Parameter | Description | Example |
|---|---|---|
| TELEGRAM_BOT_TOKEN | Your Telegram bot token obtained from @BotFather | 5432112345:AAHxyz123456789abcdefghijklmnopqrstuv |
| CHAT_ID | ID of the chat or channel where the bot will send messages | -1001234567890 |
| CUSTOM_SIGNATURE | Custom signature with Markdown formatting support | [BINGX](https://bingx.com/partner/TONFREENET/) | [TonTradingBot](https://t.me/tontrade?start=XsDjLHUq) |
| UPDATE_INTERVAL | Rate update interval in minutes | 5 |
python bot.py- Create a service file:
sudo nano /etc/systemd/system/TGCryptoInfo.service- Add the following content:
[Unit]
Description=TGCryptoInfo
After=network.target
[Service]
User=your_username
WorkingDirectory=/path/to/bot/folder
ExecStart=/path/to/python3 /path/to/bot/folder/bot.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
- Activate and start the service:
sudo systemctl daemon-reload
sudo systemctl enable crypto-bot.service
sudo systemctl start crypto-bot.servicescreen -S crypto-bot
python bot.py
# Press Ctrl+A, then D to detach from the session- Add the bot to the desired chat or channel
- Send a message to this chat
- Open in browser:
https://api.telegram.org/bot<your_token>/getUpdates - Find
"chat":{"id":XXXXXXXXX}in the response - this is the chat ID
- For channels, the bot must be added as an administrator
- For correct display of percentage changes, at least two updates are required
- APIs for getting rates have request limits, consider this when setting the update interval
MIT
ITDev && incteam