env.example 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # ========================================
  2. # Hyperliquid API Configuration (CCXT Style)
  3. # ========================================
  4. # Your Hyperliquid API Generator Secret Key (from https://app.hyperliquid.xyz/API)
  5. # This is the SECRET KEY generated by the API panel - NOT your main wallet's private key!
  6. HYPERLIQUID_SECRET_KEY=your_api_secret_key_here
  7. # Your API Wallet Address (from https://app.hyperliquid.xyz/API)
  8. # This is the NEW wallet address created by the API generator - NOT your main MetaMask address!
  9. # It will be different from your main wallet address (0x...)
  10. HYPERLIQUID_WALLET_ADDRESS=your_api_wallet_address_here
  11. # Network selection: true for testnet (safe), false for mainnet (real money!)
  12. HYPERLIQUID_TESTNET=true
  13. # Margin mode for all positions: ISOLATED (recommended) or CROSS
  14. # ISOLATED = Each position has its own margin (safer)
  15. # CROSS = All positions share the same margin pool (riskier)
  16. HYPERLIQUID_MARGIN_MODE=ISOLATED
  17. # ========================================
  18. # Trading Bot Configuration
  19. # ========================================
  20. # Default token for market/price commands (when no token specified)
  21. DEFAULT_TRADING_TOKEN=BTC
  22. # Risk management settings
  23. RISK_MANAGEMENT_ENABLED=true
  24. # Stop loss threshold based on ROE (Return on Equity) percentage - matches Hyperliquid UI
  25. # This is the percentage loss of your actual cash investment, not margin
  26. # For hard exits: 10.0 = -10% ROE triggers automatic position closure
  27. # Set to 100.0 to disable (would require -100% ROE = total loss)
  28. STOP_LOSS_PERCENTAGE=10.0
  29. # ========================================
  30. # RSI Notification Configuration
  31. # ========================================
  32. # Enable/disable RSI vs RSI_SMA notifications
  33. RSI_NOTIFICATION_ENABLED=true
  34. # Timeframe for RSI analysis
  35. RSI_TIMEFRAME=1h
  36. # RSI calculation period (typically 14)
  37. RSI_PERIOD=14
  38. # RSI SMA period for smoothing (typically 5-10)
  39. RSI_SMA_PERIOD=5
  40. # ========================================
  41. # Telegram Bot Configuration
  42. # ========================================
  43. # Get these from @BotFather in Telegram
  44. TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
  45. # Get this by running: python utils/get_telegram_chat_id.py
  46. TELEGRAM_CHAT_ID=your_chat_id_here
  47. # Enable/disable Telegram integration
  48. TELEGRAM_ENABLED=true
  49. # ========================================
  50. # Custom Keyboard Configuration
  51. # ========================================
  52. # Enable/disable custom keyboard shortcuts (Freqtrade-style persistent buttons)
  53. TELEGRAM_CUSTOM_KEYBOARD_ENABLED=true
  54. # Custom keyboard layout - comma-separated commands per row, pipe-separated rows
  55. # Format: "cmd1,cmd2,cmd3|cmd4,cmd5|cmd6,cmd7,cmd8,cmd9"
  56. # Example: "/daily,/performance,/balance|/stats,/positions,/orders|/price,/market,/help,/commands"
  57. TELEGRAM_CUSTOM_KEYBOARD_LAYOUT="/daily,/performance,/balance|/stats,/positions,/orders|/price,/market,/help,/commands"
  58. # ========================================
  59. # Bot Monitoring Configuration
  60. # ========================================
  61. # Heartbeat interval for monitoring orders, positions, and price alarms (in seconds)
  62. # Default: 10 seconds - good balance between responsiveness and API usage
  63. # Minimum recommended: 10 seconds (to avoid rate limiting)
  64. # Maximum recommended: 300 seconds (5 minutes)
  65. BOT_HEARTBEAT_SECONDS=10
  66. # Interval (in heartbeats) for running less frequent cleanup tasks in MarketMonitor
  67. # (e.g., orphaned stop loss cleanup, position synchronization)
  68. # Default: 10 heartbeats (e.g., if BOT_HEARTBEAT_SECONDS is 10s, cleanup runs every 100s)
  69. MARKET_MONITOR_CLEANUP_INTERVAL_HEARTBEATS=10
  70. # ========================================
  71. # Logging
  72. # ========================================
  73. # Options: DEBUG, INFO, WARNING, ERROR
  74. LOG_LEVEL=INFO
  75. # Enable/disable logging to file (true/false)
  76. LOG_TO_FILE=true
  77. # Log file path (relative to project root)
  78. LOG_FILE_PATH=logs/trading_bot.log
  79. # Log rotation type: 'size' (rotate when file gets too big) or 'time' (rotate daily/hourly)
  80. LOG_ROTATION_TYPE=size
  81. # For size-based rotation: max file size in MB before rotation
  82. LOG_MAX_SIZE_MB=10
  83. # For time-based rotation: when to rotate ('midnight', 'H' for hourly, 'D' for daily)
  84. LOG_ROTATION_INTERVAL=midnight
  85. # Number of backup log files to keep (older files are automatically deleted)
  86. LOG_BACKUP_COUNT=5