# Binance Trading Bot Configuration # Copy this file to .env and update with your actual values # ================================ # BINANCE API CONFIGURATION # ================================ # Get your API keys from: https://www.binance.com/en/my/settings/api-management BINANCE_API_KEY=your_binance_api_key_here BINANCE_SECRET_KEY=your_binance_secret_key_here # Use testnet for safe testing (highly recommended for beginners) BINANCE_TESTNET=true # ================================ # TRADING CONFIGURATION # ================================ # Trading symbol (e.g., BTCUSDT, ETHUSDT, ADAUSDT) TRADING_SYMBOL=BTCUSDT # Position size in base currency (e.g., 0.001 BTC for BTCUSDT) POSITION_SIZE=0.001 # Leverage (1 = spot trading, >1 = futures trading) LEVERAGE=1 # Maximum concurrent positions MAX_POSITIONS=1 # ================================ # RISK MANAGEMENT # ================================ # Stop loss percentage (e.g., 2.0 = 2% loss) STOP_LOSS_PERCENT=2.0 # Take profit percentage (e.g., 3.0 = 3% profit) TAKE_PROFIT_PERCENT=3.0 # Maximum daily loss percentage MAX_DAILY_LOSS=5.0 # Maximum portfolio risk percentage MAX_PORTFOLIO_RISK=10.0 # ================================ # TECHNICAL INDICATORS # ================================ # Bollinger Bands period (typically 20) BOLLINGER_PERIOD=20 # Bollinger Bands standard deviation (typically 2.0) BOLLINGER_STD=2.0 # Moving Average period (typically 50) MA_PERIOD=50 # Moving Average type (SMA or EMA) MA_TYPE=SMA # ================================ # TRADING STRATEGY # ================================ # Strategy type: BOLLINGER_MA, BOLLINGER_ONLY, MA_CROSSOVER, MEAN_REVERSION STRATEGY=BOLLINGER_MA # Timeframe for analysis (1m, 3m, 5m, 15m, 30m, 1h, 4h, 1d) TIMEFRAME=1m # Number of historical periods to analyze LOOKBACK_PERIODS=100 # ================================ # WEBSOCKET CONFIGURATION # ================================ # WebSocket reconnection delay in seconds WS_RECONNECT_DELAY=5 # WebSocket ping interval in seconds WS_PING_INTERVAL=20 # WebSocket timeout in seconds WS_TIMEOUT=30 # ================================ # LOGGING CONFIGURATION # ================================ # Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL LOG_LEVEL=INFO # Log file path LOG_FILE=logs/trading_bot.log # Maximum log file size in bytes (10MB) LOG_MAX_SIZE=10485760 # Number of backup log files to keep LOG_BACKUP_COUNT=5 # ================================ # DATABASE CONFIGURATION # ================================ # Database URL for performance tracking DATABASE_URL=sqlite:///data/trading_bot.db # Enable performance tracking TRACK_PERFORMANCE=true # ================================ # NOTIFICATION CONFIGURATION # ================================ # Telegram bot token for notifications (optional) TELEGRAM_BOT_TOKEN= # Telegram chat ID for notifications (optional) TELEGRAM_CHAT_ID= # Enable notifications ENABLE_NOTIFICATIONS=false # ================================ # SAFETY FEATURES # ================================ # Paper trading mode (highly recommended for testing) PAPER_TRADING=true # Enable actual trading (set to false for safety) ENABLE_TRADING=false # Trading hours (24-hour format, e.g., 09:00-17:00) TRADING_HOURS_START=00:00 TRADING_HOURS_END=23:59 # ================================ # PERFORMANCE MONITORING # ================================ # Performance update interval in seconds PERFORMANCE_UPDATE_INTERVAL=60 # Save trades to file SAVE_TRADES_TO_FILE=true # Trades file path TRADES_FILE_PATH=data/trades.json # ================================ # ADVANCED FEATURES # ================================ # Enable volume analysis ENABLE_VOLUME_ANALYSIS=false # Volume threshold for analysis VOLUME_THRESHOLD=1.5 # Enable sentiment analysis (experimental) ENABLE_SENTIMENT_ANALYSIS=false # ================================ # DOCKER CONFIGURATION # ================================ # Monitoring port for health checks MONITORING_PORT=8000 # Timezone for the container TZ=UTC # ================================ # DATABASE CONFIGURATION (Optional) # ================================ # PostgreSQL configuration for advanced analytics POSTGRES_DB=trading_bot POSTGRES_USER=trading_user POSTGRES_PASSWORD=secure_password_here POSTGRES_PORT=5432 POSTGRES_HOST_AUTH_METHOD=scram-sha-256 # ================================ # MONITORING CONFIGURATION (Optional) # ================================ # Prometheus port PROMETHEUS_PORT=9090 # Grafana port and password GRAFANA_PORT=3000 GRAFANA_PASSWORD=admin_password_here