123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- # ========================================
- # Hyperliquid API Configuration (CCXT Style)
- # ========================================
- # Your Hyperliquid API Generator Secret Key (from https://app.hyperliquid.xyz/API)
- # This is the SECRET KEY generated by the API panel - NOT your main wallet's private key!
- HYPERLIQUID_SECRET_KEY=your_api_secret_key_here
- # Your API Wallet Address (from https://app.hyperliquid.xyz/API)
- # This is the NEW wallet address created by the API generator - NOT your main MetaMask address!
- # It will be different from your main wallet address (0x...)
- HYPERLIQUID_WALLET_ADDRESS=your_api_wallet_address_here
- # Network selection: true for testnet (safe), false for mainnet (real money!)
- HYPERLIQUID_TESTNET=true
- # Margin mode for all positions: ISOLATED (recommended) or CROSS
- # ISOLATED = Each position has its own margin (safer)
- # CROSS = All positions share the same margin pool (riskier)
- HYPERLIQUID_MARGIN_MODE=ISOLATED
- # ========================================
- # Trading Bot Configuration
- # ========================================
- # Default token for market/price commands (when no token specified)
- DEFAULT_TRADING_TOKEN=BTC
- # Risk management settings
- RISK_MANAGEMENT_ENABLED=true
- # Stop loss threshold based on ROE (Return on Equity) percentage - matches Hyperliquid UI
- # This is the percentage loss of your actual cash investment, not margin
- # For hard exits: 10.0 = -10% ROE triggers automatic position closure
- # Set to 100.0 to disable (would require -100% ROE = total loss)
- STOP_LOSS_PERCENTAGE=10.0
- # ========================================
- # Copy Trading Configuration
- # ========================================
- # Enable/disable copy trading functionality
- COPY_TRADING_ENABLED=true
- # Trader address to follow (from our analysis)
- COPY_TRADING_TARGET_ADDRESS=0x59f5371933249060bbe97462b297c840abc5c36e
- # Portfolio allocation percentage for copy trading (0.0 to 1.0)
- # 0.1 = 10% of account, 0.5 = 50% of account, 1.0 = 100% of account
- COPY_TRADING_PORTFOLIO_PERCENTAGE=0.1
- # Copy trading mode: PROPORTIONAL or FIXED
- # PROPORTIONAL: Scale position size based on target trader's portfolio percentage
- # FIXED: Use fixed percentage of your account regardless of their position size
- COPY_TRADING_MODE=PROPORTIONAL
- # Maximum leverage to use when copying (safety limit)
- # Will use target trader's leverage but cap it at this value
- COPY_TRADING_MAX_LEVERAGE=10
- # Minimum position size in USD (to avoid dust trades)
- COPY_TRADING_MIN_POSITION_SIZE=10.0
- # Delay between trade detection and execution (seconds)
- # Small delay to avoid API rate limits and ensure data consistency
- COPY_TRADING_EXECUTION_DELAY=5
- # Enable copy trading notifications via Telegram
- COPY_TRADING_NOTIFICATIONS=true
- # Only copy NEW trades (skip existing positions on startup)
- # true = Only copy trades that happen after bot starts (recommended)
- # false = Copy all positions immediately on startup (legacy behavior)
- COPY_TRADING_ONLY_NEW_TRADES=true
- # ========================================
- # RSI Notification Configuration
- # ========================================
- # Enable/disable RSI vs RSI_SMA notifications
- RSI_NOTIFICATION_ENABLED=true
- # Timeframe for RSI analysis
- RSI_TIMEFRAME=1h
- # RSI calculation period (typically 14)
- RSI_PERIOD=14
- # RSI SMA period for smoothing (typically 5-10)
- RSI_SMA_PERIOD=5
- # ========================================
- # Telegram Bot Configuration
- # ========================================
- # Get these from @BotFather in Telegram
- TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
- # Get this by running: python utils/get_telegram_chat_id.py
- TELEGRAM_CHAT_ID=your_chat_id_here
- # Enable/disable Telegram integration
- TELEGRAM_ENABLED=true
- # ========================================
- # Custom Keyboard Configuration
- # ========================================
- # Enable/disable custom keyboard shortcuts (Freqtrade-style persistent buttons)
- TELEGRAM_CUSTOM_KEYBOARD_ENABLED=true
- # Custom keyboard layout - comma-separated commands per row, pipe-separated rows
- # Format: "cmd1,cmd2,cmd3|cmd4,cmd5|cmd6,cmd7,cmd8,cmd9"
- # Example: "/daily,/performance,/balance|/stats,/positions,/orders|/price,/market,/help,/commands"
- TELEGRAM_CUSTOM_KEYBOARD_LAYOUT="/daily,/performance,/balance|/stats,/positions,/orders|/price,/market,/help,/commands"
- # ========================================
- # Bot Monitoring Configuration
- # ========================================
- # Heartbeat interval for monitoring orders, positions, and price alarms (in seconds)
- # Default: 10 seconds - good balance between responsiveness and API usage
- # Minimum recommended: 10 seconds (to avoid rate limiting)
- # Maximum recommended: 300 seconds (5 minutes)
- BOT_HEARTBEAT_SECONDS=10
- # Interval (in heartbeats) for running less frequent cleanup tasks in MarketMonitor
- # (e.g., orphaned stop loss cleanup, position synchronization)
- # Default: 10 heartbeats (e.g., if BOT_HEARTBEAT_SECONDS is 10s, cleanup runs every 100s)
- MARKET_MONITOR_CLEANUP_INTERVAL_HEARTBEATS=10
- # ========================================
- # Logging
- # ========================================
- # Options: DEBUG, INFO, WARNING, ERROR
- LOG_LEVEL=INFO
- # Enable/disable logging to file (true/false)
- LOG_TO_FILE=true
- # Log file path (relative to project root)
- LOG_FILE_PATH=logs/trading_bot.log
- # Log rotation type: 'size' (rotate when file gets too big) or 'time' (rotate daily/hourly)
- LOG_ROTATION_TYPE=size
- # For size-based rotation: max file size in MB before rotation
- LOG_MAX_SIZE_MB=10
- # For time-based rotation: when to rotate ('midnight', 'H' for hourly, 'D' for daily)
- LOG_ROTATION_INTERVAL=midnight
- # Number of backup log files to keep (older files are automatically deleted)
- LOG_BACKUP_COUNT=5
|