# ๐ฑ Commands Reference **Complete guide to all Hyperliquid Trading Bot commands** ## ๐ Quick Start Commands The most important commands to get started: ``` /start # Show main menu with quick action buttons /balance # Check your account balance /long BTC 10 # Open long position with $10 USDC /sl BTC 9000 # Set stop loss at $9,000 /tp BTC 11000 # Set take profit at $11,000 /monitoring # Check order monitoring status /performance # Token performance ranking /daily # Daily performance (last 10 days) /alarm BTC 50000 # Set price alert for BTC at $50,000 /help # Full command reference ``` **๐ก Auto-Notifications:** The bot automatically monitors your orders every 30 seconds and sends notifications when orders are filled! ## ๐ผ Account Management ### `/balance` Show your current account balance and P&L summary with detailed breakdown of available vs used funds. **Example:** ``` /balance ``` **Response:** ``` ๐ฐ Account Balance ๐ต USDC: ๐ Total: 1,250.00 โ Available: 1,150.00 ๐ In Use: 100.00 ๐ต BTC: ๐ Total: 0.002 โ Available: 0.001 ๐ In Use: 0.001 ๐ผ Portfolio Summary: ๐ฐ Total Value: $1,250.00 ๐ Available for Trading: $1,150.00 ๐ In Active Use: $100.00 ๐ Performance: ๐ต P&L: $150.00 (+13.64%) ๐ Initial: $1,100.00 ``` ### `/positions` Display all open positions with unrealized P&L and percentages. **Example:** ``` /positions ``` **Response:** ``` ๐ Open Positions ๐ BTC (LONG) ๐ Size: 0.001000 BTC ๐ฐ Entry: $45,230.50 ๐ต Value: $45.23 ๐ข P&L: $1.84 (+4.07%) ๐ ETH (SHORT) ๐ Size: 0.010000 ETH ๐ฐ Entry: $3,200.00 ๐ต Value: $32.00 ๐ด P&L: -$0.75 (-2.34%) ๐ผ Total Portfolio: ๐ต Total Value: $77.23 ๐ข Total P&L: $1.09 (+1.43%) ``` ### `/orders [token (optional)]` Show all pending/open orders, optionally filtered by token. **Usage:** ``` /orders # Show all open orders /orders <TOKEN> # Show open orders for specific token ``` **Examples:** ``` /orders # Show all open orders /orders BTC # Show only Bitcoin orders /orders ETH # Show only Ethereum orders ``` **Response (All Orders):** ``` ๐ All Open Orders ๐ข BTC ๐ BUY 0.001 @ $44,500.00 ๐ต Value: $44.50 ๐ ID: abc123 ๐ด ETH ๐ SELL 0.01 @ $3,400.00 ๐ต Value: $34.00 ๐ ID: def456 ๐ก Filter by token: /orders BTC, /orders ETH ``` **Response (Filtered):** ``` ๐ Open Orders - BTC ๐ข BTC ๐ BUY 0.001 @ $44,500.00 ๐ต Value: $44.50 ๐ ID: abc123 ๐ข BTC ๐ BUY 0.002 @ $44,000.00 ๐ต Value: $88.00 ๐ ID: ghi789 ๐ก Quick Actions: โข /coo BTC - Cancel all BTC orders โข /orders - View all orders ``` **Response (No Orders):** ``` ๐ญ No open orders for BTC ๐ก No pending BTC orders found. Use /long BTC 100 or /short BTC 100 to create new orders. ``` ### `/coo [token]` Cancel all open orders for a specific token. **Usage:** ``` /coo <TOKEN> ``` **Examples:** ``` /coo BTC # Cancel all Bitcoin orders /coo ETH # Cancel all Ethereum orders ``` **How it works:** 1. Fetches all open orders for the specified token 2. Shows confirmation dialog with order details 3. Cancels all orders after user confirmation 4. Reports success/failure for each order **Confirmation Dialog:** ``` โ ๏ธ Cancel All BTC Orders ๐ Orders to Cancel: ๐ข BUY 0.001 @ $44,500.00 ($44.50) ๐ข BUY 0.002 @ $44,000.00 ($88.00) ๐ด SELL 0.001 @ $46,000.00 ($46.00) ๐ฐ Total Value: $178.50 ๐ข Orders Count: 3 โ ๏ธ Are you sure you want to cancel ALL BTC orders? This action cannot be undone. ``` **Success Response:** ``` โ Cancel Orders Results ๐ Summary: โข Token: BTC โข Cancelled: 3 orders โข Failed: 0 orders โข Total Attempted: 3 orders ๐๏ธ Successfully Cancelled: ๐ข BUY 0.001 @ $44,500.00 ๐ข BUY 0.002 @ $44,000.00 ๐ด SELL 0.001 @ $46,000.00 ๐ All BTC orders successfully cancelled! ``` ### `/stats` Complete trading statistics and performance metrics. **Example:** ``` /stats ``` **Response:** ``` ๐ Trading Statistics ๐ฐ Balance Overview โข Initial: $1,000.00 โข Current: $1,150.00 โข Total P&L: $150.00 โข Total Return: 15.00% ๐ Trading Activity โข Total Trades: 25 โข Buy Orders: 13 โข Sell Orders: 12 โข Days Active: 30 ๐ Performance Metrics โข Win Rate: 68.0% โข Profit Factor: 2.15 โข Avg Win: $45.50 โข Avg Loss: $28.75 โข Expectancy: $6.25 ๐ Risk Metrics โข Sharpe Ratio: 1.85 โข Sortino Ratio: 2.41 โข Max Drawdown: 8.5% โข Volatility: 12.3% โข VaR (95%): 3.2% ๐ฏ Best/Worst โข Largest Win: $125.50 โข Largest Loss: $45.25 โข Max Consecutive Wins: 5 โข Max Consecutive Losses: 2 ๐ Since: 2024-01-15 ``` ## ๐ Performance Analytics ### `/performance [token (optional)]` Show token performance ranking or detailed stats for a specific token. **Usage:** ``` /performance # Show all token rankings /performance <TOKEN> # Detailed stats for specific token ``` **Examples:** ``` /performance # Token performance ranking /performance BTC # Detailed Bitcoin performance /performance ETH # Detailed Ethereum performance ``` **Response (Ranking):** ``` ๐ Token Performance Ranking ๐ฅ BTC ๐ข P&L: $245.50 (+12.3%) ๐ Trades: 15 | Win: 73% ๐ฅ ETH ๐ข P&L: $125.75 (+8.9%) ๐ Trades: 12 | Win: 67% ๐ฅ SOL ๐ด P&L: -$25.00 (-2.1%) ๐ Trades: 8 | Win: 38% ๐ผ Portfolio Summary: ๐ข Total P&L: $346.25 ๐ Tokens Traded: 3 ๐ Completed Trades: 35 ๐ก Usage: /performance BTC for detailed BTC stats ``` **Response (Detailed):** ``` ๐ BTC Detailed Performance ๐ฐ P&L Summary: โข ๐ข Total P&L: $245.50 (+12.3%) โข ๐ต Total Volume: $2,150.00 โข ๐ Expectancy: $16.37 ๐ Trading Activity: โข Total Trades: 20 โข Completed: 15 โข Buy Orders: 11 โข Sell Orders: 9 ๐ Performance Metrics: โข Win Rate: 73.3% โข Profit Factor: 2.85 โข Wins: 11 | Losses: 4 ๐ก Best/Worst: โข Largest Win: $85.50 โข Largest Loss: $35.25 โข Avg Win: $32.50 โข Avg Loss: $18.75 ๐ Recent Trades: โข ๐ด SELL $450 @ 12/15 14:30 | P&L: $25.50 โข ๐ข BUY $425 @ 12/14 09:15 โข ๐ด SELL $380 @ 12/13 16:45 | P&L: $15.25 ๐ Use /performance to see all token rankings ``` ### `/daily` Show daily performance breakdown for the last 10 days. **Example:** ``` /daily ``` **Response:** ``` ๐ Daily Performance (Last 10 Days) ๐ Dec 15, 2024 ๐ข P&L: $45.25 (+2.1%) ๐ Trades: 3 ๐ Dec 14, 2024 ๐ด P&L: -$15.50 (-0.7%) ๐ Trades: 2 ๐ Dec 13, 2024 ๐ข P&L: $85.75 (+4.2%) ๐ Trades: 5 ๐ Dec 12, 2024 ๐ข P&L: $12.00 (+0.6%) ๐ Trades: 1 ๐ Dec 11, 2024 ๐ข P&L: $25.50 (+1.3%) ๐ Trades: 2 ๐ผ 10-Day Summary: ๐ข Total P&L: $153.00 ๐ Total Trades: 13 ๐ Avg per Day: $15.30 ``` ### `/weekly` Show weekly performance breakdown for the last 10 weeks. **Example:** ``` /weekly ``` **Response:** ``` ๐ Weekly Performance (Last 10 Weeks) ๐ Week Dec 9-15, 2024 ๐ข P&L: $125.50 (+5.8%) ๐ Trades: 8 ๐ Week Dec 2-8, 2024 ๐ข P&L: $85.25 (+4.1%) ๐ Trades: 6 ๐ Week Nov 25-Dec 1, 2024 ๐ด P&L: -$25.75 (-1.2%) ๐ Trades: 4 ๐ Week Nov 18-24, 2024 ๐ข P&L: $45.00 (+2.3%) ๐ Trades: 3 ๐ผ 10-Week Summary: ๐ข Total P&L: $230.00 ๐ Total Trades: 21 ๐ Avg per Week: $23.00 ``` ### `/monthly` Show monthly performance breakdown for the last 10 months. **Example:** ``` /monthly ``` **Response:** ``` ๐ Monthly Performance (Last 10 Months) ๐ December 2024 ๐ข P&L: $245.50 (+11.2%) ๐ Trades: 15 ๐ November 2024 ๐ข P&L: $185.25 (+9.1%) ๐ Trades: 12 ๐ October 2024 ๐ด P&L: -$45.75 (-2.1%) ๐ Trades: 8 ๐ September 2024 ๐ข P&L: $125.00 (+6.5%) ๐ Trades: 10 ๐ผ 10-Month Summary: ๐ข Total P&L: $510.00 ๐ Total Trades: 45 ๐ Avg per Month: $51.00 ``` ## ๐ Perps Trading ### `/long [token] [USDC amount] [price (optional)]` Open a long position using market order or limit order. **Usage:** ``` /long <TOKEN> <USDC_AMOUNT> # Market order /long <TOKEN> <USDC_AMOUNT> <PRICE> # Limit order ``` **Examples:** ``` /long BTC 100 # Long Bitcoin with $100 USDC (Market Order) /long BTC 100 45000 # Long Bitcoin with $100 USDC at $45,000 (Limit Order) /long ETH 50 # Long Ethereum with $50 USDC (Market Order) /long ETH 50 3200 # Long Ethereum with $50 USDC at $3,200 (Limit Order) ``` **How it works:** 1. **Market Order** (2 parameters): Fetches current market price and places market buy order 2. **Limit Order** (3 parameters): Places limit buy order at specified price 3. Calculates token amount: `token_amount = usdc_amount / price` 4. Records trade in statistics **Market Order Confirmation:** ``` ๐ข Long Position Confirmation ๐ Order Details: โข Token: BTC โข Direction: LONG (Buy) โข USDC Value: $100.00 โข Current Price: $45,230.50 โข Order Type: Market Order โข Token Amount: 0.002211 BTC ๐ฏ Execution: โข Will buy 0.002211 BTC at current market price โข Est. Value: $100.00 โ ๏ธ Are you sure you want to open this long position? ``` **Limit Order Confirmation:** ``` ๐ข Long Position Confirmation ๐ Order Details: โข Token: BTC โข Direction: LONG (Buy) โข USDC Value: $100.00 โข Current Price: $45,230.50 โข Order Type: Limit Order โข Token Amount: 0.002222 BTC ๐ฏ Execution: โข Will buy 0.002222 BTC at $45,000.00 โข Est. Value: $100.00 โ ๏ธ Are you sure you want to open this long position? ``` ### `/short [token] [USDC amount] [price (optional)]` Open a short position using market order or limit order. **Usage:** ``` /short <TOKEN> <USDC_AMOUNT> # Market order /short <TOKEN> <USDC_AMOUNT> <PRICE> # Limit order ``` **Examples:** ``` /short BTC 100 # Short Bitcoin with $100 USDC (Market Order) /short BTC 100 46000 # Short Bitcoin with $100 USDC at $46,000 (Limit Order) /short ETH 50 # Short Ethereum with $50 USDC (Market Order) /short ETH 50 3400 # Short Ethereum with $50 USDC at $3,400 (Limit Order) ``` **How it works:** 1. **Market Order** (2 parameters): Fetches current market price and places market sell order 2. **Limit Order** (3 parameters): Places limit sell order at specified price 3. Calculates token amount: `token_amount = usdc_amount / price` 4. Records trade in statistics **Market Order Confirmation:** ``` ๐ด Short Position Confirmation ๐ Order Details: โข Token: BTC โข Direction: SHORT (Sell) โข USDC Value: $100.00 โข Current Price: $45,230.50 โข Order Type: Market Order โข Token Amount: 0.002211 BTC ๐ฏ Execution: โข Will sell 0.002211 BTC at current market price โข Est. Value: $100.00 โ ๏ธ Are you sure you want to open this short position? ``` **Limit Order Confirmation:** ``` ๐ด Short Position Confirmation ๐ Order Details: โข Token: BTC โข Direction: SHORT (Sell) โข USDC Value: $100.00 โข Current Price: $45,230.50 โข Order Type: Limit Order โข Token Amount: 0.002174 BTC ๐ฏ Execution: โข Will sell 0.002174 BTC at $46,000.00 โข Est. Value: $100.00 โ ๏ธ Are you sure you want to open this short position? ``` ### `/exit [token]` Close an open position using market order. **Usage:** ``` /exit <TOKEN> ``` **Examples:** ``` /exit BTC # Close Bitcoin position (long or short) /exit ETH # Close Ethereum position /exit SOL # Close Solana position ``` **How it works:** 1. Checks for existing position in the specified token 2. Determines position direction (long/short) and size 3. Creates opposite market order to close position 4. Shows position details and estimated P&L 5. Executes market order after confirmation **Confirmation Dialog:** ``` ๐ด Exit Position Confirmation ๐ Position Details: โข Token: BTC โข Position: LONG โข Size: 0.002211 contracts โข Entry Price: $45,230.50 โข Current Price: $46,150.00 โข ๐ข Unrealized P&L: $203.45 ๐ฏ Exit Order: โข Action: SELL (Close LONG) โข Amount: 0.002211 BTC โข Est. Value: ~$102.03 โข Order Type: Market Order โ ๏ธ Are you sure you want to close this LONG position? This will place a market sell order to close your entire BTC position. ``` ## ๐ก๏ธ Risk Management ### `/sl [token] [price]` Set a stop loss order to limit downside risk. **Usage:** ``` /sl <TOKEN> <PRICE> ``` **Examples:** ``` /sl BTC 44000 # Stop loss for Bitcoin at $44,000 /sl ETH 3200 # Stop loss for Ethereum at $3,200 ``` **How it works:** 1. Checks for existing position in the specified token 2. Validates stop loss price against position direction: - **Long positions**: Stop loss must be BELOW entry price - **Short positions**: Stop loss must be ABOVE entry price 3. Places limit order at stop loss price 4. Order executes automatically when price is reached **Confirmation Dialog:** ``` ๐ Stop Loss Order Confirmation ๐ Position Details: โข Token: BTC โข Position: LONG โข Size: 0.002211 contracts โข Entry Price: $45,230.50 โข Current Price: $46,150.00 ๐ฏ Stop Loss Order: โข Stop Price: $44,000.00 โข Action: SELL (Close LONG) โข Amount: 0.002211 BTC โข Order Type: Limit Order โข ๐ด Est. P&L: -$272.15 โ ๏ธ Are you sure you want to set this stop loss? This will place a limit sell order at $44,000.00 to protect your LONG position. ``` ### `/tp [token] [price]` Set a take profit order to secure gains. **Usage:** ``` /tp <TOKEN> <PRICE> ``` **Examples:** ``` /tp BTC 50000 # Take profit for Bitcoin at $50,000 /tp ETH 3800 # Take profit for Ethereum at $3,800 ``` **How it works:** 1. Checks for existing position in the specified token 2. Validates take profit price against position direction: - **Long positions**: Take profit must be ABOVE entry price - **Short positions**: Take profit must be BELOW entry price 3. Places limit order at take profit price 4. Order executes automatically when price is reached **Confirmation Dialog:** ``` ๐ฏ Take Profit Order Confirmation ๐ Position Details: โข Token: BTC โข Position: LONG โข Size: 0.002211 contracts โข Entry Price: $45,230.50 โข Current Price: $46,150.00 ๐ฐ Take Profit Order: โข Target Price: $50,000.00 โข Action: SELL (Close LONG) โข Amount: 0.002211 BTC โข Order Type: Limit Order โข ๐ข Est. P&L: $1,054.35 โ ๏ธ Are you sure you want to set this take profit? This will place a limit sell order at $50,000.00 to capture profits from your LONG position. ``` ## ๐ Market Data ### `/price [token (optional)]` Quick price check for any token. **Usage:** ``` /price # Default trading token price /price <TOKEN> # Specific token price ``` **Examples:** ``` /price # Default token price /price BTC # Bitcoin price /price ETH # Ethereum price /price SOL # Solana price ``` **Response:** ``` ๐ต BTC: $45,230.50 โฐ Updated: 14:25:30 ๐ก Usage: /price BTC or /price for default ``` ### `/market [token (optional)]` Detailed market data with orderbook information. **Usage:** ``` /market # Default trading token market data /market <TOKEN> # Specific token market data ``` **Examples:** ``` /market # Default token market data /market BTC # Bitcoin market data /market ETH # Ethereum market data ``` **Response:** ``` ๐ Market Data - BTC ๐ต Current Price: $45,230.50 ๐ 24h High: $46,850.00 ๐ 24h Low: $44,120.00 ๐ 24h Volume: 2,450.25 ๐ข Best Bid: $45,225.00 ๐ด Best Ask: $45,235.00 ๐ Spread: $10.00 (0.022%) ๐ก Usage: /market BTC or /market for default ``` ### `/trades` Recent trade history. **Example:** ``` /trades ``` **Response:** ``` ๐ Recent Trades ๐ข BUY 0.002211 BTC/USDC:USDC ๐ฐ $45,230.50 | ๐ต $100.00 ๐ 12/15 14:25 ๐ด SELL 0.001850 ETH/USDC:USDC ๐ฐ $3,200.00 | ๐ต $59.20 ๐ 12/15 13:40 ๐ข BUY 0.008500 SOL/USDC:USDC ๐ฐ $85.00 | ๐ต $72.25 ๐ 12/15 12:15 ``` ## ๐ Price Alerts ### `/alarm [token] [price] OR [token] OR [alarm_id] OR (no args)` Comprehensive price alert system with multiple usage patterns. **Usage:** ``` /alarm # List all active alarms /alarm <TOKEN> # List alarms for specific token /alarm <TOKEN> <PRICE> # Set new alarm /alarm <ALARM_ID> # Remove alarm by ID ``` **Examples:** ``` /alarm # List all alarms /alarm BTC # List Bitcoin alarms /alarm BTC 50000 # Set BTC alarm at $50,000 /alarm ETH 3500 # Set ETH alarm at $3,500 /alarm 3 # Remove alarm ID 3 ``` **Set New Alarm:** ``` /alarm BTC 50000 ``` **Response:** ``` โ Price Alarm Created ๐ Alarm Details: โข Alarm ID: 5 โข Token: BTC โข Target Price: $50,000.00 โข Current Price: $45,230.50 โข Direction: ABOVE ๐ Alert Condition: Will trigger when BTC price moves above $50,000.00 ๐ฐ Price Difference: โข Distance: $4,769.50 (10.55%) โข Status: ACTIVE โ โฐ Created: 14:25:30 ๐ก The alarm will be checked every 30 seconds and you'll receive a notification when triggered. ``` **List All Alarms:** ``` /alarm ``` **Response:** ``` ๐ Active Price Alarms (5 total) ๐จ Alarm #1: BTC โข Target: $50,000.00 (ABOVE) โข Current: $45,230.50 โข Distance: $4,769.50 (10.55%) ๐จ Alarm #2: ETH โข Target: $3,500.00 (ABOVE) โข Current: $3,200.00 โข Distance: $300.00 (9.38%) ๐จ Alarm #3: BTC โข Target: $44,000.00 (BELOW) โข Current: $45,230.50 โข Distance: $1,230.50 (2.72%) ๐ก Usage: โข /alarm BTC - Show BTC alarms only โข /alarm BTC 52000 - Set new BTC alarm โข /alarm 3 - Remove alarm ID 3 ``` **List Token Alarms:** ``` /alarm BTC ``` **Response:** ``` ๐ BTC Price Alarms (2 total) ๐จ Alarm #1: BTC โข Target: $50,000.00 (ABOVE) โข Current: $45,230.50 โข Distance: $4,769.50 (10.55%) ๐จ Alarm #3: BTC โข Target: $44,000.00 (BELOW) โข Current: $45,230.50 โข Distance: $1,230.50 (2.72%) ๐ก Set new: /alarm BTC 52000 ๐ก Remove: /alarm 1 or /alarm 3 ``` **Alarm Triggered Notification:** ``` ๐จ PRICE ALARM TRIGGERED! ๐จ ๐ Alarm Details: โข Token: BTC โข Target Price: $50,000.00 โข Current Price: $50,125.50 โข Direction: ABOVE โ Condition Met: BTC moved ABOVE $50,000.00 โฐ Triggered: 16:45:22 ๐ฏ Alarm ID: 1 (automatically removed) ๐ก Price has increased by $4,895.00 (+10.82%) since alarm was set. ``` **Remove Alarm:** ``` /alarm 3 ``` **Response:** ``` โ Alarm ID 3 has been removed. ``` ## ๐ Order Monitoring & Notifications The bot automatically monitors your orders and positions every 30 seconds and sends real-time notifications when orders are filled. ### Automatic Notifications **๐ Position Opened Notifications** ``` ๐ Position Opened ๐ Trade Details: โข Token: BTC โข Direction: LONG โข Size: 0.002 contracts โข Entry Price: $45,230.50 โข Value: $90.46 โ Status: New LONG position opened โฐ Time: 14:25:30 ๐ฑ Use /positions to view all positions ``` **๐ฏ Position Closed Notifications** ``` ๐ฏ Position Closed ๐ Trade Summary: โข Token: BTC โข Direction: LONG โข Size: 0.002 contracts โข Entry Price: $45,230.50 โข Exit Price: $46,150.00 โข Exit Value: $92.30 ๐ข Profit & Loss: โข P&L: $1.84 (+2.04%) โข Result: PROFIT โ Status: Position fully closed โฐ Time: 16:45:22 ๐ Use /stats to view updated performance ``` **๐ Partial Position Closed** ``` ๐ Position Partially Closed ๐ Partial Close Details: โข Token: BTC โข Direction: LONG โข Closed Size: 0.001 contracts โข Entry Price: $45,230.50 โข Exit Price: $46,150.00 ๐ข Partial P&L: โข P&L: $0.92 (+2.04%) โ Status: Partial position closed โฐ Time: 15:30:15 ๐ Use /positions to view remaining position ``` **๐ External Trade Detection** ``` ๐ External Trade Detected ๐ Trade Details: โข Token: ETH โข Side: BUY โข Amount: 0.015 ETH โข Price: $3,200.00 โข Value: $48.00 ๐ข Source: Direct Platform Trade โฐ Time: 14:35:20 ๐ Note: This trade was executed outside the Telegram bot ๐ Stats have been automatically updated ``` ### `/monitoring` Check the status of all monitoring systems. **Example:** ``` /monitoring ``` **Response:** ``` ๐ System Monitoring Status ๐ Order Monitoring: โข Active: โ Yes โข Check Interval: 30 seconds โข Orders Tracked: 3 โข Positions Tracked: 2 ๐ Price Alarms: โข Active Alarms: 5 โข Triggered Today: 2 โข Tokens Monitored: 3 โข Next Alarm ID: 6 ๐ External Trade Monitoring: โข Last Check: 2024-12-15 14:25:30 โข Auto Stats Update: โ Enabled โข External Notifications: โ Enabled ๐ก๏ธ Risk Management: โข Automatic Stop Loss: โ Disabled โข Stop Loss Threshold: 5.0% โข Position Monitoring: โ Inactive ๐ Notifications: โข ๐ Position Opened/Increased โข ๐ Position Partially/Fully Closed โข ๐ฏ P&L Calculations โข ๐ Price Alarm Triggers โข ๐ External Trade Detection โข ๐ Automatic Stop Loss Triggers โฐ Last Check: 14:25:30 ๐ก Monitoring Features: โข Real-time order fill detection โข Automatic P&L calculation โข Position change tracking โข Price alarm monitoring โข External trade monitoring โข Auto stats synchronization โข Instant Telegram notifications ๐ Active Alarms by Token: โข BTC: 2 alarms โข ETH: 2 alarms โข SOL: 1 alarm ``` ## ๐๏ธ System Management ### `/logs [cleanup] [days (optional)]` View log file statistics and manage log cleanup. **Usage:** ``` /logs # Show log statistics /logs cleanup # Clean logs older than 30 days (default) /logs cleanup <DAYS> # Clean logs older than specified days ``` **Examples:** ``` /logs # View log stats /logs cleanup # Clean old logs (30 days) /logs cleanup 7 # Clean logs older than 7 days ``` **Log Statistics:** ``` ๐ System Logging Status ๐ Current Log Files: โข Main Log: trading_bot_20241215.log (2.5 MB) โข Error Log: bot_errors.log (0.8 MB) โข Archive Files: 5 files (12.3 MB total) ๐ Log Activity (Last 24h): โข Total Entries: 2,450 โข Info: 2,180 (89%) โข Warning: 195 (8%) โข Error: 75 (3%) ๐พ Disk Usage: โข Current Logs: 3.3 MB โข Archive Logs: 12.3 MB โข Total Usage: 15.6 MB ๐ Log Configuration: โข Log Level: INFO โข Heartbeat Interval: 30s โข Bot Uptime: 2024-12-15 14:25:30 ๐ก Log Management: โข /logs cleanup - Clean old logs (30 days) โข /logs cleanup 7 - Clean logs older than 7 days โข Log rotation happens automatically โข Old backups are removed automatically ๐ง Configuration: โข Rotation Type: SIZE โข Max Size: 10MB (size rotation) โข Backup Count: 5 ``` **Log Cleanup:** ``` /logs cleanup 7 ``` **Response:** ``` ๐งน Cleaning up log files older than 7 days... โ Log cleanup completed! ``` ## ๐ก Pro Tips ### **๐ฏ Best Practices** - Start small and test with small amounts first - Use confirmations and always review orders - Monitor positions regularly with `/positions` - Track performance with `/stats` and `/performance` - Set up price alerts with `/alarm` for key levels - Review daily/weekly performance with `/daily` and `/weekly` ### **โก Quick Trading** ```bash /long BTC 10 # Quick $10 long (market) /long BTC 10 44000 # Quick $10 long at $44k (limit) /sl BTC 42000 # Set stop loss /tp BTC 48000 # Set take profit /exit BTC # Close position ``` ### **๐ก๏ธ Risk Management** ```bash # Long position protection /long BTC 100 # Open long /sl BTC 42000 # Stop loss 5% below /tp BTC 50000 # Take profit 10% above /alarm BTC 41000 # Emergency alert ``` ### **๐ Performance Tracking** ```bash /stats # Overall performance /performance # Token rankings /daily # Daily breakdown /weekly # Weekly trends /monthly # Monthly analysis /performance BTC # Detailed BTC stats ``` ### **๐ Alert Management** ```bash /alarm BTC 50000 # Set upside alert /alarm BTC 40000 # Set downside alert /alarm # Check all alarms /alarm BTC # Check BTC alarms /alarm 3 # Remove alarm ID 3 ``` ### **๐ Monitoring** ```bash /balance # Check account /positions # Monitor open trades /monitoring # Check system status /orders # All open orders /logs # System health ``` ## โ ๏ธ Important Notes ### **๐ก๏ธ Safety Features** - **Confirmation dialogs** for all trades - **Auto-notifications** for order fills - **Real-time monitoring** every 30 seconds - **Comprehensive logging** of all activities - **Price alerts** for key levels - **External trade detection** and sync ### **๐ Order Monitoring** - **30-second intervals** for order fill detection - **Automatic P&L calculation** for closed positions - **Position change tracking** (opens, closes, increases) - **Instant Telegram notifications** for all fills - **External trade monitoring** and sync ### **๐ Performance Analytics** - **Token-level performance tracking** with rankings - **Period-based analysis** (daily/weekly/monthly) - **Comprehensive statistics** with risk metrics - **Real-time P&L calculations** with percentages - **Trade history** and pattern analysis ### **๐ Alert System** - **Price alerts** with automatic monitoring - **Customizable thresholds** for any token - **Direction-based triggers** (above/below) - **Automatic removal** after trigger - **Multi-token support** with unlimited alerts ### **๐ฑ Mobile Optimized** - **One-tap buttons** for quick actions - **Clean formatting** for mobile screens - **Instant notifications** for trade results - **Real-time order fill alerts** - **Comprehensive emoji indicators** ## ๐ Getting Started 1. **Configure**: Set up your `.env` file with API keys 2. **Test**: Start with `/balance` and `/price` 3. **Trade**: Try `/long BTC 10` for a small market order 4. **Monitor**: Use `/monitoring` to check auto-notifications 5. **Track**: Use `/positions`, `/stats`, and `/performance` 6. **Alerts**: Set up `/alarm BTC 50000` for price notifications 7. **Analyze**: Review `/daily`, `/weekly` performance **Happy trading! ๐ฑ๐ฐ**