env.example 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. # ========================================
  14. # Trading Bot Configuration
  15. # ========================================
  16. # Default token for market/price commands (when no token specified)
  17. DEFAULT_TRADING_TOKEN=BTC
  18. # Risk management settings
  19. RISK_MANAGEMENT_ENABLED=true
  20. STOP_LOSS_PERCENTAGE=10.0
  21. # ========================================
  22. # Telegram Bot Configuration
  23. # ========================================
  24. # Get these from @BotFather in Telegram
  25. TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
  26. # Get this by running: python utils/get_telegram_chat_id.py
  27. TELEGRAM_CHAT_ID=your_chat_id_here
  28. # Enable/disable Telegram integration
  29. TELEGRAM_ENABLED=true
  30. # ========================================
  31. # Custom Keyboard Configuration
  32. # ========================================
  33. # Enable/disable custom keyboard shortcuts (Freqtrade-style persistent buttons)
  34. TELEGRAM_CUSTOM_KEYBOARD_ENABLED=true
  35. # Custom keyboard layout - comma-separated commands per row, pipe-separated rows
  36. # Format: "cmd1,cmd2,cmd3|cmd4,cmd5|cmd6,cmd7,cmd8,cmd9"
  37. # Example: "/daily,/performance,/balance|/stats,/positions,/orders|/price,/market,/help,/commands"
  38. TELEGRAM_CUSTOM_KEYBOARD_LAYOUT="/daily,/performance,/balance|/stats,/positions,/orders|/price,/market,/help,/commands"
  39. # ========================================
  40. # Bot Monitoring Configuration
  41. # ========================================
  42. # Heartbeat interval for monitoring orders, positions, and price alarms (in seconds)
  43. # Default: 10 seconds - good balance between responsiveness and API usage
  44. # Minimum recommended: 10 seconds (to avoid rate limiting)
  45. # Maximum recommended: 300 seconds (5 minutes)
  46. BOT_HEARTBEAT_SECONDS=10
  47. # Interval (in heartbeats) for running less frequent cleanup tasks in MarketMonitor
  48. # (e.g., orphaned stop loss cleanup, position synchronization)
  49. # Default: 10 heartbeats (e.g., if BOT_HEARTBEAT_SECONDS is 10s, cleanup runs every 100s)
  50. MARKET_MONITOR_CLEANUP_INTERVAL_HEARTBEATS=10
  51. # ========================================
  52. # Logging
  53. # ========================================
  54. # Options: DEBUG, INFO, WARNING, ERROR
  55. LOG_LEVEL=INFO
  56. # Enable/disable logging to file (true/false)
  57. LOG_TO_FILE=true
  58. # Log file path (relative to project root)
  59. LOG_FILE_PATH=logs/trading_bot.log
  60. # Log rotation type: 'size' (rotate when file gets too big) or 'time' (rotate daily/hourly)
  61. LOG_ROTATION_TYPE=size
  62. # For size-based rotation: max file size in MB before rotation
  63. LOG_MAX_SIZE_MB=10
  64. # For time-based rotation: when to rotate ('midnight', 'H' for hourly, 'D' for daily)
  65. LOG_ROTATION_INTERVAL=midnight
  66. # Number of backup log files to keep (older files are automatically deleted)
  67. LOG_BACKUP_COUNT=5