A Telegram bot that monitors live Bybit spot prices and notifies you the moment a target price is hit. Built with Python, aiogram v3, and async architecture.
- Set price alerts for any USDT pair listed on Bybit
- Get notified instantly when price goes above or below your target
- View all your currently active alerts
- Concurrent price monitoring loop running every 30 seconds
- FSM-driven conversation flow for a clean, guided user experience
- Send
/startto the bot - Tap Set Alert → enter coin name (e.g.
BTC) → enter target price → choose Above or Below - The bot monitors Bybit prices every 30 seconds in the background
- When your target is hit, you receive an instant Telegram notification and the alert is cleared
.
├── bot.py # Main entry point
├── .env # Environment variables (not committed)
└── Learn6_Arbi_System/
└── learn6.py # Bybit API client (get_bid_ask)
| Class | Responsibility |
|---|---|
Form |
FSM states for the 3-step alert creation flow |
Task_manager |
Stores active alerts in memory, validates pairs |
Handlers |
All aiogram message and callback handlers |
Engine |
Initialises dependencies, runs the price monitor loop |
- Python 3.10+
- A Telegram bot token from @BotFather
git clone https://github.com/yourusername/bybit-price-alert-bot.git
cd bybit-price-alert-bot
pip install -r requirements.txtCreate a .env file in the project root:
TG_BOT_TOKEN=your_telegram_bot_token_herepython -m path.to.botaiogram>=3.0
python-dotenv
aiohttp
User: /start
Bot: Welcome To my Bot [Set Alert] [My Alerts]
User: Set Alert
Bot: Name of the coin please
User: BTC
Bot: What price?
User: 70000
Bot: Get notified when price is above or below? [Above] [Below]
User: (taps Above)
Bot: Alert successfully set. You will get a notification immediately it is reached.
--- 30 seconds later, BTC hits $70,001 ---
Bot: Price 70000.0 for BTCUSDT reached. Current price: 70001.5
- No persistence — alerts are stored in memory. A bot restart clears all active alerts.
- No
/cancelcommand — if you start setting an alert and want to abort, you currently need to complete the flow or restart with/start. - Pairs list is loaded once at startup. Newly listed Bybit pairs won't be recognised until restart.
- SQLite or Redis persistence for alerts across restarts
-
/cancelcommand to exit mid-flow -
/deletecommand to remove a specific alert by index - Periodic refresh of available trading pairs
- Support for non-USDT pairs
Built by Redox — Hussein Ridwan Ademola Digital Services
MIT