# TradingAgents Environment Configuration # Copy this file to .env and fill in your values # ============================================================================= # API Keys (Required) # ============================================================================= OPENAI_API_KEY=your_openai_api_key_here FINNHUB_API_KEY=your_finnhub_api_key_here # Optional API Keys OPENROUTER_API_KEY=your_openrouter_api_key_here GOOGLE_API_KEY=your_google_api_key_here ANTHROPIC_API_KEY=your_anthropic_api_key_here # Reddit API (Optional - for social media analysis) REDDIT_CLIENT_ID=your_reddit_client_id REDDIT_CLIENT_SECRET=your_reddit_client_secret REDDIT_USER_AGENT=TradingAgents/1.0 # ============================================================================= # SSL/TLS Certificate Configuration (OPTIONAL) # ============================================================================= # Certificate Bundle Path (ONLY set if you need a custom certificate bundle) # If not set, system default SSL behavior is used # Common locations: # - macOS: /etc/ssl/cert.pem # - Ubuntu/Debian: /etc/ssl/certs/ca-certificates.crt # - CentOS/RHEL: /etc/pki/tls/certs/ca-bundle.crt # - Custom: /path/to/your/custom-ca-bundle.crt # REQUESTS_CA_BUNDLE=/etc/ssl/cert.pem # CURL_CA_BUNDLE=/etc/ssl/cert.pem # SSL Verification (ONLY set to false if needed for development/testing) # If not set, SSL verification is enabled by default (recommended) # SSL_VERIFY=false # HTTP Timeout (ONLY set if default timeout is insufficient) # If not set, uses reasonable defaults # HTTP_TIMEOUT=60 # ============================================================================= # Proxy Configuration (ONLY if behind corporate firewall) # ============================================================================= # HTTP/HTTPS Proxy Settings (ONLY set if required by your network) # If not set, direct connections are used # HTTP_PROXY=http://proxy.company.com:8080 # HTTPS_PROXY=https://proxy.company.com:8080 # Proxy with authentication # HTTP_PROXY=http://username:password@proxy.company.com:8080 # HTTPS_PROXY=https://username:password@proxy.company.com:8080 # ============================================================================= # Application Settings # ============================================================================= # Results Directory TRADINGAGENTS_RESULTS_DIR=./results # Ollama Configuration (if using local Ollama) OLLAMA_HOST=localhost # Optional Configuration # DEBUG=True # LOG_LEVEL=INFO # ============================================================================= # SSL Certificate Examples for Common Enterprise Environments # ============================================================================= # Example 1: Using system certificate store (macOS) # REQUESTS_CA_BUNDLE=/System/Library/OpenSSL/certs/cert.pem # Example 2: Using system certificate store (Ubuntu/Debian) # REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt # Example 3: Using custom corporate certificate bundle # REQUESTS_CA_BUNDLE=/usr/local/share/ca-certificates/corporate-ca-bundle.crt # Example 4: Disabling SSL verification (development only) # SSL_VERIFY=false # ============================================================================= # Troubleshooting SSL Issues # ============================================================================= # If you encounter SSL certificate errors: # 1. Run the diagnostic tool: python diagnose_ssl.py # 2. Check if your organization uses a custom CA # 3. Ask your IT department for the corporate certificate bundle # 4. Try using certifi's bundle: pip install certifi # 5. Set REQUESTS_CA_BUNDLE to certifi's location (usually shown by diagnose_ssl.py) # Common SSL Error Solutions: # - "certificate verify failed": Set REQUESTS_CA_BUNDLE to correct cert bundle # - "SSL: WRONG_VERSION_NUMBER": Check if you're behind a proxy # - "Connection timeout": Increase HTTP_TIMEOUT or check proxy settings # - "Name or service not known": Check DNS settings and proxy configuration