TradingAgents/.env.example

86 lines
3.4 KiB
Plaintext

# =============================================================================
# TradingAgents Configuration
# =============================================================================
# -----------------------------------------------------------------------------
# LLM Provider Configuration (Choose One)
# -----------------------------------------------------------------------------
# For OpenAI
# OPENAI_API_KEY=your_openai_api_key_here
# For Anthropic Claude (Currently Active)
ANTHROPIC_API_KEY=your_key_here
# For Google Gemini
# GOOGLE_API_KEY=your_google_api_key_here
# For OpenRouter (News Sentiment Analysis)
OPENROUTER_API_KEY=your_openrouter_api_key_here
# -----------------------------------------------------------------------------
# LLM Settings
# -----------------------------------------------------------------------------
LLM_PROVIDER=anthropic
DEEP_THINK_LLM=claude-3-5-sonnet-20241022
QUICK_THINK_LLM=claude-3-5-haiku-20241022
NEWS_SENTIMENT_LLM=openai/gpt-oss-120b
NEWS_EMBEDDING_LLM=qwen/qwen3-embedding-8b
BACKEND_URL=https://api.anthropic.com/v1
# -----------------------------------------------------------------------------
# Database Configuration
# -----------------------------------------------------------------------------
# PostgreSQL with asyncpg driver for main database
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/tradingagents
# PostgreSQL for testing (separate database)
TEST_DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/tradingagents_test
# Enable SQL query logging (true/false)
SQL_ECHO=false
# -----------------------------------------------------------------------------
# Data Sources (Optional but Recommended)
# -----------------------------------------------------------------------------
# FinnHub API for financial data (free tier available)
# Sign up at: https://finnhub.io/
FINNHUB_API_KEY=your_finnhub_api_key_here
# Reddit API for social sentiment analysis
# Create app at: https://www.reddit.com/prefs/apps/
# Choose "script" application type
REDDIT_CLIENT_ID=your_reddit_client_id_here
REDDIT_CLIENT_SECRET=your_reddit_client_secret_here
REDDIT_USER_AGENT=TradingAgents/1.0 by YourUsername
# -----------------------------------------------------------------------------
# System Configuration
# -----------------------------------------------------------------------------
# Data and results directories
TRADINGAGENTS_RESULTS_DIR=./results
TRADINGAGENTS_DATA_DIR=/Users/martinrichards/Documents/TradingAgents/data
# Analysis settings
MAX_DEBATE_ROUNDS=5
MAX_RISK_DISCUSS_ROUNDS=5
MAX_RECUR_LIMIT=100
# Tool settings
ONLINE_TOOLS=true
# -----------------------------------------------------------------------------
# Setup Instructions:
# -----------------------------------------------------------------------------
# 1. Copy this file to .env: `cp .env.example .env`
# 2. Replace placeholder values with your actual API keys
# 3. Set ONLINE_TOOLS=true to fetch live data from APIs
# 4. Set ONLINE_TOOLS=false to use cached data only (requires local data files)
#
# API Setup Guide:
# ✅ LLM Provider - Choose one: OpenAI, Anthropic, or Google
# ✅ FinnHub - Sign up at https://finnhub.io/ for financial data
# ✅ Reddit - Create app at https://www.reddit.com/prefs/apps/ for social sentiment
# ✅ Google News - No API key required (web scraping)
# ✅ Yahoo Finance - No API key required (free access via yfinance)
# -----------------------------------------------------------------------------