# ๐Ÿ“ฑ Quick Setup Guide - Manual Trading Bot ## ๐ŸŽฏ What You're Getting **Complete manual control of your Hyperliquid account from your phone with professional trading statistics.** โœ… **Phone Trading**: Buy/sell from anywhere via Telegram โœ… **Full Statistics**: Win rate, Sharpe ratio, Sortino, P&L, drawdown, etc. โœ… **Balance Tracking**: Starting balance vs current with % returns โœ… **Trade History**: Every trade logged with automatic P&L calculation โœ… **Risk Metrics**: Professional-grade performance analytics โœ… **Safe Default**: Starts in testnet mode ## ๐Ÿš€ 5-Minute Setup ### Step 1: Create Telegram Bot (2 minutes) 1. **Open Telegram** โ†’ Search **@BotFather** 2. Send: `/newbot` 3. **Name your bot**: "My Trading Bot" 4. **Username**: something like `mytradingbot_123_bot` 5. **Save the token** (looks like: `123456789:ABCdefGHIjklMNOPqrs`) ### Step 2: Get Your Chat ID (1 minute) ```bash # In your terminal python get_telegram_chat_id.py ``` - **Message your bot** anything in Telegram - **Copy the Chat ID** from terminal output ### Step 3: Configure Bot (2 minutes) ```bash # Copy example config cp env.example .env # Edit with your info (use any text editor) nano .env ``` **Set these 4 things in `.env`:** ```env HYPERLIQUID_PRIVATE_KEY=your_private_key_here TELEGRAM_BOT_TOKEN=your_token_from_botfather TELEGRAM_CHAT_ID=your_chat_id_from_script TELEGRAM_ENABLED=true ``` ### Step 4: Start Trading! ```bash python manual_trading_bot.py ``` **That's it!** ๐ŸŽ‰ Open Telegram and send `/start` to your bot. ## ๐Ÿ“ฑ What You Can Do ### Instant Commands - `/balance` - Check balance + P&L - `/stats` - Complete trading statistics - `/buy 0.001 50000` - Buy 0.001 BTC at $50,000 - `/sell 0.001 55000` - Sell 0.001 BTC at $55,000 - `/positions` - Open positions - `/orders` - Pending orders ### Quick Buttons Send `/start` to see instant action buttons for one-tap: - ๐Ÿ’ฐ Balance, ๐Ÿ“Š Stats, ๐Ÿ“ˆ Positions, ๐Ÿ“‹ Orders, ๐Ÿ’ต Price ## ๐Ÿ“Š Statistics You Get **From the moment you first launch, the bot tracks:** ``` ๐Ÿ“Š Trading Statistics ๐Ÿ’ฐ Balance Overview โ€ข Initial: $1,000.00 โ† Your starting balance โ€ข Current: $1,150.00 โ† Real-time balance โ€ข Total P&L: $150.00 โ† Profit/Loss โ€ข Total Return: 15.00% โ† % return ๐Ÿ“ˆ Trading Activity โ€ข Total Trades: 25 โ† Complete count โ€ข Buy Orders: 13 โ† Trade breakdown โ€ข Sell Orders: 12 โ€ข Days Active: 30 โ† Time since first launch ๐Ÿ† Performance Metrics โ€ข Win Rate: 68.0% โ† % profitable trades โ€ข Profit Factor: 2.15 โ† Gains รท Losses โ€ข Avg Win: $45.50 โ† Average profitable trade โ€ข Avg Loss: $28.75 โ† Average losing trade โ€ข Expectancy: $6.25 โ† Expected $ per trade ๐Ÿ“Š Risk Metrics โ€ข Sharpe Ratio: 1.85 โ† Risk-adjusted returns โ€ข Sortino Ratio: 2.41 โ† Downside risk metric โ€ข Max Drawdown: 8.5% โ† Worst decline from peak โ€ข Volatility: 12.3% โ† Price volatility โ€ข VaR (95%): 3.2% โ† Value at Risk ๐ŸŽฏ Best/Worst โ€ข Largest Win: $125.00 โ† Best single trade โ€ข Largest Loss: $75.00 โ† Worst single trade โ€ข Max Consecutive Wins: 5 โ† Winning streaks โ€ข Max Consecutive Losses: 2 โ† Losing streaks ``` ## ๐Ÿ›ก๏ธ Safety Features ### โœ… Testnet First - **Starts in testnet by default** (fake money) - Test everything before real trading - Switch to mainnet when ready ### โœ… Order Confirmations - **Every trade needs confirmation** - Clear order details shown - Easy cancel button ### โœ… Complete Logging - All trades automatically recorded - Statistics saved between restarts - Full audit trail with order IDs ## ๐Ÿ”ง Where Are Your Keys? ### Hyperliquid Private Key **Testnet** (for learning): 1. Go to [Hyperliquid Testnet](https://app.hyperliquid-testnet.xyz/) 2. Create/connect wallet โ†’ Export private key **Mainnet** (real money): 1. Go to [Hyperliquid](https://app.hyperliquid.xyz/) 2. Connect wallet โ†’ Export private key โš ๏ธ **Keep private keys secure** - never share them! ## ๐ŸŽฎ Try the Demo See what your statistics will look like: ```bash python demo_stats.py ``` This creates sample trading data so you can see all the metrics the bot tracks. ## ๐Ÿ” Troubleshooting ### "Configuration validation failed" - Check your `.env` file has all 4 required fields - Make sure `TELEGRAM_ENABLED=true` ### "Telegram bot not responding" - Verify bot token from @BotFather - Check Chat ID from `get_telegram_chat_id.py` - Make sure you messaged your bot first ### "Private key not set" - Get private key from Hyperliquid (see above) - Add to `.env` file ## ๐ŸŽฏ Quick Commands Reference ```bash # Setup python get_telegram_chat_id.py # Get Chat ID python demo_stats.py # See sample statistics python manual_trading_bot.py # Start trading bot # Test configuration python -c "from config import Config; Config.validate()" ``` ## ๐Ÿ“ˆ What Makes This Special - **No coding required** - Just use Telegram commands - **Professional analytics** - Same metrics as trading platforms - **Phone optimized** - Trade from anywhere - **Comprehensive tracking** - Every stat you need - **Persistent data** - Statistics saved between sessions - **Safe by default** - Testnet mode prevents accidents **You get institutional-grade trading analytics with simple phone control! ๐Ÿš€๐Ÿ“ฑ**