QUICK_START.md 4.2 KB

๐Ÿš€ 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

  1. ๐Ÿ” Validates all your configuration
  2. ๐Ÿ“Š Loads your existing trading statistics (if any)
  3. ๐Ÿš€ Starts Telegram bot for phone control
  4. ๐Ÿ“ฑ Sends startup notification to your phone
  5. ๐Ÿ›ก๏ธ Monitors for errors and auto-restarts if needed
  6. ๐Ÿ“ 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

  1. ๐Ÿš€ One Command: python trading_bot.py does everything
  2. ๐Ÿ“Š Never Lose Data: Statistics persist forever
  3. ๐Ÿ›ก๏ธ Self-Healing: Auto-restarts on errors
  4. ๐Ÿ“ฑ Phone Alerts: Know about issues instantly
  5. ๐Ÿ“ Complete Audit: Full logging of everything
  6. โš™๏ธ Foolproof Setup: Clear validation and instructions

Your trading bot is now professional-grade with phone control and bulletproof reliability! ๐Ÿš€๐Ÿ“ฑ