Multi-language cryptocurrency tracking bot for Telegram — track wallets, monitor mempool, price alerts, and technical analysis.
SPONSORED BY
OVPN SPIDER
Secure. Private. Unrestricted. — Your trusted VPN proxy for safe and anonymous browsing.
- Overview
- Differences: Python vs PHP
- Features
- Architecture
- Project Structure
- Setup & Installation
- Configuration
- Usage
- How It Works
- API Dependencies
- Database Schema
- Security & Responsibilities
- Support
- Development
- License
Buzz Crypto Bot is a Telegram bot that provides real-time cryptocurrency tracking, Bitcoin wallet intelligence, mempool monitoring, price alerts, and technical analysis. It is implemented in two independent versions — Python and PHP — giving you deployment flexibility across different hosting environments.
Both versions share the same feature set, API integrations, and database schema. Choose the one that best fits your infrastructure.
| Aspect | Python (crypto-bot-py/) |
PHP (crypto-bot/) |
|---|---|---|
| Runtime | Python 3.9+ | PHP 8.1+ with extensions curl, sqlite3, gd |
| Dependencies | requests, matplotlib (via pip) |
No external packages (uses built-in curl, gd) |
| Performance | Higher throughput with persistent connection pooling | Slightly lower, adequate for single-bot use |
| Chart Engine | Matplotlib (smoother visuals) | PHP GD (basic PNG rendering) |
| Async Ready | Can be extended with asyncio/aiohttp | Synchronous only |
| Hosting Compatibility | VPS, cloud servers, Raspberry Pi | Shared hosting, cPanel, cheap PHP hosts |
| Memory Footprint | ~50-80 MB | ~20-40 MB |
| Setup Complexity | pip install + env vars | PHP extensions + env vars |
| Image Quality | High-quality matplotlib charts | Basic GD-based line charts |
| File Size | ~1.5 MB (with deps) | ~200 KB (no deps) |
Which one should you use?
- Use Python if you have a VPS, prefer better charts, and want easier maintainability.
- Use PHP if you only have shared hosting, need minimal dependencies, or want the lightest footprint.
| Feature | Description |
|---|---|
| Live Prices | Real-time USD prices, 24h change, market cap for 25+ cryptocurrencies via CoinGecko |
| Price Charts | PNG charts with SMA overlays (1d / 7d / 30d / 90d) |
| Technical Analysis | RSI(14), MACD, SMA50/200, Bollinger Bands, support/resistance, BUY/SELL/HOLD signals |
| Wallet Intelligence | Full BTC address lookups: balance, received, sent, UTXOs, recent transactions |
| Wallet Tracking | Watchlist with labels, auto-refresh balances across all tracked wallets |
| Mempool Monitor | Pending tx count, mempool size, fee estimates (sat/vB), recent transactions |
| Price Alerts | Set above/below BTC price targets; auto-notify when triggered (5-min check interval) |
| Admin Panel | User management, ban/unban, broadcast messages, usage statistics |
| Interactive UI | Inline keyboard buttons for all commands, plus keyboard shortcuts |
| Proxy Support | Built-in proxy support for HTTP/HTTPS/SOCKS5; custom API base URL for Cloudflare Workers |
| Persistent Storage | SQLite database with WAL mode — users, wallets, alerts, command logs |
Telegram User
|
v
Telegram Bot API <--> [ Cloudflare Worker Proxy ] <--> Bot Process
|
+-----------+-----------+---+
| | |
v v v
CoinGecko Blockchain Mempool.space
.info
The bot uses long-polling (getUpdates with a 30-second timeout) to receive messages. All API calls go through configurable proxy support, allowing operation in regions where Telegram is restricted.
Crypto Bot/
|
+-- crypto-bot-py/ # Python implementation
| +-- main.py # Entry point, command routing, message handling
| +-- config.py # Environment variable configuration
| +-- requirements.txt # Python dependencies
| +-- lib/
| +-- telegram_api.py # Telegram Bot API wrapper
| +-- coingecko_api.py # CoinGecko API client
| +-- blockchain_api.py # Blockchain.info + Mempool.space client
| +-- database.py # SQLite database layer
| +-- price_predictor.py # Technical analysis engine
| +-- chart_generator.py # Matplotlib chart generation
| +-- helpers.py # Formatting utilities
|
+-- crypto-bot/ # PHP implementation
| +-- bot.php # Entry point, command routing
| +-- config.php # Configuration (reads env vars)
| +-- lib/
| +-- TelegramApi.php # Telegram Bot API wrapper
| +-- CoinGeckoApi.php # CoinGecko API client
| +-- BlockchainApi.php # Blockchain.info + Mempool.space client
| +-- Database.php # SQLite database layer
| +-- PricePredictor.php # Technical analysis engine
| +-- ChartGenerator.php # GD-based chart generation
| +-- Helpers.php # Formatting utilities
|
+-- .gitignore
+-- LICENSE
+-- README.md
- Python bot: Python 3.9+, pip
- PHP bot: PHP 8.1+, extensions:
curl,sqlite3,gd - A Telegram Bot Token from @BotFather
- (Optional) A Cloudflare Workers proxy URL if Telegram is blocked in your region
# 1. Clone the repository
git clone https://github.com/clayhackergroup/buzz-crypto.git
cd buzz-crypto/crypto-bot-py
# 2. Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Linux/Mac
# .\venv\Scripts\activate # Windows
# 3. Install dependencies
pip install -r requirements.txt
# 4. Set environment variables
export CRYPTO_BOT_TOKEN="your_bot_token_here"
export CRYPTO_BOT_ADMIN_ID="your_telegram_user_id"
export BOT_API_URL="https://api.telegram.org/bot" # or proxy URL
# 5. Run the bot
python main.py# 1. Clone the repository
git clone https://github.com/clayhackergroup/buzz-crypto.git
cd buzz-crypto/crypto-bot
# 2. Set environment variables
export CRYPTO_BOT_TOKEN="your_bot_token_here"
export CRYPTO_BOT_ADMIN_ID="your_telegram_user_id"
# 3. Run the bot
php bot.phpIf Telegram is blocked in your country (e.g., India, Iran, UAE), use a proxy or Cloudflare Worker:
Deploy this Cloudflare Worker and set:
# Python
export BOT_API_URL="https://your-worker.workers.dev/bot"
# PHP (also reads BOT_API_URL env var)
export BOT_API_URL="https://your-worker.workers.dev/bot"export BOT_PROXY="http://your-proxy:port"
# or
export BOT_PROXY="socks5://127.0.0.1:1080"The bot will route all API calls (Telegram, CoinGecko, Blockchain.info, Mempool.space) through the configured proxy.
All configuration is done via environment variables (no hardcoded secrets):
| Variable | Required | Default | Description |
|---|---|---|---|
CRYPTO_BOT_TOKEN |
Yes | — | Telegram Bot Token from @BotFather |
CRYPTO_BOT_ADMIN_ID |
Yes | — | Your Telegram user ID (admin privileges) |
BOT_API_URL |
No | https://api.telegram.org/bot |
Custom API base URL (for proxies) |
BOT_PROXY |
No | — | HTTP/SOCKS5 proxy for all API calls |
| Command | Description |
|---|---|
/start or /help |
Show welcome message with interactive buttons |
/price [coin...] |
Live prices (default: top 12). E.g., /price btc eth sol |
/chart [coin] [tf] |
Price chart with SMA overlays. Timeframes: 1d, 7d, 30d, 90d |
/predict [coin] |
Technical analysis: RSI, MACD, SMA, Bollinger, signal |
/info [address] |
Full Bitcoin wallet intelligence |
/watch [address] [label] |
Track a Bitcoin wallet |
/wallets |
List all tracked wallets with balances |
/unwatch [address] |
Stop tracking a wallet |
/alert [above|below] [price] |
Set BTC price alert |
/alerts |
View and manage alerts |
/mempool |
Bitcoin mempool statistics and fee estimates |
Only the user with CRYPTO_BOT_ADMIN_ID can execute:
| Command | Description |
|---|---|
/admin |
Admin panel with stats |
/users |
List all registered users |
/stats |
Detailed bot statistics |
/ban [user_id] |
Ban a user |
/unban [user_id] |
Unban a user |
/broadcast [message] |
Send message to all users |
- User sends a message or taps a button in Telegram
- Bot polls
getUpdates(30s long-poll) to receive the update processUpdate()routes the message to the appropriate command handler- Handler calls external APIs (CoinGecko, Blockchain.info, Mempool.space) as needed
- Response is formatted and sent back via
sendMessageoreditMessageText - All interactions are logged to SQLite for analytics
while True:
for update in getUpdates(offset, timeout=30):
processUpdate(update)
offset = update.id + 1
checkPriceAlerts() # every 5 minutes
- RSI(14): Relative Strength Index using average gain/loss over 14 periods
- MACD: 12-period EMA minus 26-period EMA, with 9-period signal line
- SMA50/200: Simple Moving Averages over 50 and 200 periods
- Bollinger Bands: 20-period SMA with 2-standard-deviation bands
- Overall Signal: Weighted score from all indicators -> BUY/SELL/HOLD
- Every 5 minutes, the bot fetches the current BTC price
- Compares against all active alerts across all users
- If triggered, sends a notification and marks the alert as triggered
| Service | Usage | Rate Limits |
|---|---|---|
| Telegram Bot API | Message delivery | 30 msg/sec per bot |
| CoinGecko API | Price data, historical data, market data | 10-50 calls/min (free tier) |
| Blockchain.info | BTC address info, balances, UTXOs | No official limit; be reasonable |
| Mempool.space | Mempool stats, fee estimates | 1 req/sec recommended |
The bot uses SQLite with WAL mode for persistent storage.
| Column | Type | Description |
|---|---|---|
user_id |
INTEGER PK | Telegram user ID |
username |
TEXT | @username |
first_name |
TEXT | First name |
last_name |
TEXT | Last name |
first_seen |
TEXT | First interaction timestamp |
last_seen |
TEXT | Last interaction timestamp |
banned |
INTEGER | 1 if banned |
is_admin |
INTEGER | 1 if admin |
| Column | Type | Description |
|---|---|---|
id |
INTEGER PK | Auto-increment |
user_id |
INTEGER | Owner |
address |
TEXT | BTC address |
label |
TEXT | User-defined label |
created_at |
TIMESTAMP | When added |
| Column | Type | Description |
|---|---|---|
id |
INTEGER PK | Auto-increment |
user_id |
INTEGER | Owner |
target_price |
REAL | Price threshold |
direction |
TEXT | 'above' or 'below' |
triggered |
INTEGER | 1 if already notified |
created_at |
TIMESTAMP | When created |
| Column | Type | Description |
|---|---|---|
id |
INTEGER PK | Auto-increment |
user_id |
INTEGER | Who executed |
command |
TEXT | Command name |
timestamp |
TEXT | When executed |
- NEVER hardcode bot tokens or admin IDs in source code. Always use environment variables.
- The
.gitignoreexcludes*.db,__pycache__,.env, and log files by default. - If you accidentally commit credentials: rotate them immediately at @BotFather.
| Responsibility | Description |
|---|---|
| API Rate Limits | Respect rate limits of CoinGecko, Blockchain.info, and Mempool.space. Excessive calls may get your IP throttled. |
| User Privacy | The bot stores Telegram user IDs and wallet addresses. Do not share or expose this data. |
| Bot Security | Use a strong, unique bot token. Restrict admin commands to trusted individuals only. |
| Database Backups | SQLite database is a single file (crypto_bot.db). Back it up regularly. |
| Proxy Safety | If using a proxy, ensure it is from a trusted provider. Proxies can see your traffic metadata. |
- Users are responsible for complying with local laws regarding cryptocurrency tracking tools.
- The bot does not provide financial advice. Technical analysis signals are for informational purposes only.
- Full documentation is available in this README.
- For Telegram Bot API reference: core.telegram.org/bots/api
- For CoinGecko API: coingecko.com/en/api
| Platform | Handle / Link |
|---|---|
| Telegram Support | @MeMrDefault |
| @exp1oit | |
| @h4cker.in |
Open an issue on GitHub with:
- Bot version (Python or PHP)
- Full error message
- Steps to reproduce
| Role | Name |
|---|---|
| Lead Developer | Spidey |
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Python: Follow PEP 8. Type hints required for all functions.
- PHP: Follow PSR-12. Strict typing enabled.
- All API calls must support proxy configuration.
- No hardcoded credentials or secrets.
Distributed under the MIT License. See LICENSE for more information.
SPONSORED BY OVPN SPIDER
Download on Google Play — ovpnspider.com
Made with by clayhackergroup