๐ Quick Start - Your Questions Answered
โ
Stats Persistence: YES, Forever Saved!
Your trading statistics are permanently saved to trading_stats.json
and automatically loaded every time you restart the bot. Your complete trading history, P&L, win rates, and all performance metrics survive forever between launches.
๐ Organized Structure: Clean & Simple
trader_hyperliquid/
โโโ ๐ trading_bot.py # ONE COMMAND TO RUN EVERYTHING
โโโ ๐ trading_stats.json # Your persistent data
โโโ ๐ .env # Your config
โโโ
โโโ ๐ง src/ # Core modules (don't touch)
โโโ ๐ ๏ธ utils/ # Setup helpers
โโโ โ๏ธ config/ # Configuration template
โโโ ๐ logs/ # Auto-created logs & errors
๐ฏ Single Command Launch: Super Simple
python trading_bot.py # THIS IS ALL YOU NEED!
- โ
Launches Telegram bot automatically
- โ
Handles all errors and restarts
- โ
Sends notifications to your phone
- โ
Manages all logging and persistence
๐ก๏ธ Built-in Safeguards: Bulletproof
- ๐ Auto-restart: Up to 10 attempts if crashes
- ๐ฑ Error notifications: Instant alerts to your Telegram
- ๐ Complete logging: All errors saved to files
- โ๏ธ Graceful shutdown: Ctrl+C stops cleanly
- ๐ Data protection: Stats never lost
๐ Setup in 3 Minutes
1. Get Telegram Chat ID
python utils/get_telegram_chat_id.py
2. Configure Bot
cp config/env.example .env
nano .env # Add your keys and Chat ID
3. Start Trading!
python trading_bot.py
๐ฑ What Happens When You Start
- ๐ Validates all your configuration
- ๐ Loads your existing trading statistics (if any)
- ๐ Starts Telegram bot for phone control
- ๐ฑ Sends startup notification to your phone
- ๐ก๏ธ Monitors for errors and auto-restarts if needed
- ๐ Logs everything to daily log files
๐ Error Handling Examples
If Bot Crashes:
- ๐ Auto-restarts in 5 seconds
- ๐ฑ Sends error alert to your Telegram
- ๐ Logs details to
logs/bot_errors.log
- โฐ Increases delay for repeated failures
If Internet Disconnects:
- ๐ Keeps trying to reconnect
- ๐ฑ Notifies you when back online
- ๐ Preserves all your trading data
If Configuration Missing:
- โ Stops safely before starting
- ๐ก Shows clear instructions for setup
- ๐ Tells you exactly what's missing
๐ Your Trading Data is Safe
Persistent Between Launches:
- โ
Starting balance remembered
- โ
All trade history preserved
- โ
Performance metrics calculated
- โ
Risk analytics maintained
- โ
Win/loss streaks tracked
Automatic Backups:
- ๐ Every trade logged to files
- ๐ Statistics saved after each trade
- ๐ Daily log files created
- ๐ฑ Critical events sent to phone
๐ฏ Daily Usage
Start Bot:
python trading_bot.py
Trade via Phone:
- Open Telegram โ Find your bot
- Send
/start
for quick buttons
- Use
/buy 0.001 50000
to trade
- Check
/stats
for performance
Monitor:
- Bot sends error notifications automatically
- Check
/stats
for trading performance
- View logs:
tail -f logs/trading_bot_$(date +%Y%m%d).log
๐ง Troubleshooting
"Configuration validation failed"
cp config/env.example .env
nano .env # Add your keys
"Import error"
source venv/bin/activate
pip install -r requirements.txt
"Telegram not responding"
python utils/get_telegram_chat_id.py # Get correct Chat ID
๐ก Key Benefits
- ๐ One Command:
python trading_bot.py
does everything
- ๐ Never Lose Data: Statistics persist forever
- ๐ก๏ธ Self-Healing: Auto-restarts on errors
- ๐ฑ Phone Alerts: Know about issues instantly
- ๐ Complete Audit: Full logging of everything
- โ๏ธ Foolproof Setup: Clear validation and instructions
Your trading bot is now professional-grade with phone control and bulletproof reliability! ๐๐ฑ