Add official Polymarket API support, one-click setup, and redesigned README
- Add TRADE_API_MODE setting to switch between official (public, no auth) and internal API - Implement _fetch_trades_official() using Polymarket data-api /trades endpoint - Default to official API so users can run without private API access - Add interactive setup.sh that guides users through API key configuration - Add Makefile with common commands (setup, run, dashboard, etc.) - Add Dockerfile and .dockerignore for container deployment - Redesign README with badges, feature tables, mermaid diagram, architecture - Clean up .env.example with organized sections and signup links - Update pyproject.toml dependencies to match requirements.txt Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
88a5309bd9
commit
09b203110c
+55
-28
@@ -1,35 +1,62 @@
|
||||
# LLM API (Gemini official)
|
||||
GEMINI_API_KEY=your_api_key_here
|
||||
# ============================================================
|
||||
# Polymarket Whale Watcher - Configuration
|
||||
# ============================================================
|
||||
# Copy to .env and fill in your API keys:
|
||||
# cp .env.example .env
|
||||
#
|
||||
# Only GEMINI_API_KEY is required. Everything else is optional.
|
||||
# ============================================================
|
||||
|
||||
# --- Required ---
|
||||
GEMINI_API_KEY=your_gemini_api_key_here
|
||||
|
||||
# --- Trade Data Source ---
|
||||
# "official" = Polymarket public API (no auth needed, default)
|
||||
# "internal" = Private API (requires INTERNAL_API_URL + INTERNAL_API_KEY)
|
||||
TRADE_API_MODE=official
|
||||
|
||||
# Internal API (only needed when TRADE_API_MODE=internal)
|
||||
# INTERNAL_API_URL=http://103.197.25.170:18088
|
||||
# INTERNAL_API_KEY=your_internal_api_key_here
|
||||
|
||||
# --- LLM Settings ---
|
||||
LLM_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai/
|
||||
|
||||
# Internal trade data API
|
||||
INTERNAL_API_URL=http://103.197.25.170:18088
|
||||
INTERNAL_API_KEY=your_internal_api_key_here
|
||||
|
||||
# Polygon Wallet Private Key (for trade execution)
|
||||
POLYGON_WALLET_PRIVATE_KEY=your_private_key_here
|
||||
|
||||
# MongoDB Connection String
|
||||
MONGODB_URI=mongodb://localhost:27017/whale_watcher
|
||||
|
||||
# Whale Detection Settings
|
||||
MIN_TRADE_SIZE_USD=1000
|
||||
MIN_PRICE=0
|
||||
MAX_PRICE=0.7
|
||||
|
||||
# Monitoring Settings
|
||||
FETCH_INTERVAL_SECONDS=5
|
||||
TRENDING_MARKETS_LIMIT=50
|
||||
|
||||
# LLM Settings
|
||||
LLM_MODEL=gemini-3-flash-preview
|
||||
LLM_TEMPERATURE=0
|
||||
|
||||
# Trade Execution (set to true to enable actual trading)
|
||||
# --- Optional: Search & Data APIs (enhances LLM analysis) ---
|
||||
# TAVILY_API_KEY= # Web search (https://tavily.com)
|
||||
# TWITTER_API_KEY= # Twitter sentiment
|
||||
# SERPER_API_KEY= # Web search fallback (https://serper.dev)
|
||||
# POLYGON_API_KEY= # Stocks, forex (https://polygon.io)
|
||||
# FRED_API_KEY= # Economic indicators (https://fred.stlouisfed.org)
|
||||
# ETHERSCAN_API_KEY= # On-chain data (https://etherscan.io)
|
||||
# CONGRESS_API_KEY= # US legislation (https://api.congress.gov)
|
||||
|
||||
# --- Optional: Telegram Monitoring ---
|
||||
# TELEGRAM_API_ID=
|
||||
# TELEGRAM_API_HASH=
|
||||
# TELEGRAM_SESSION_STRING=
|
||||
# TELEGRAM_CHANNELS=
|
||||
|
||||
# --- Whale Detection Tuning ---
|
||||
MIN_TRADE_SIZE_USD=1000
|
||||
MIN_PRICE=0
|
||||
MAX_PRICE=0.7
|
||||
FETCH_INTERVAL_SECONDS=15
|
||||
TRENDING_MARKETS_LIMIT=50
|
||||
|
||||
# --- Email Alerts (optional) ---
|
||||
EMAIL_ENABLED=false
|
||||
# EMAIL_SMTP_SERVER=smtp.qq.com
|
||||
# EMAIL_SMTP_PORT=465
|
||||
# EMAIL_SENDER=
|
||||
# EMAIL_PASSWORD=
|
||||
# EMAIL_RECIPIENT=
|
||||
|
||||
# --- Trade Execution (disabled by default, use with caution) ---
|
||||
ENABLE_TRADE_EXECUTION=false
|
||||
# POLYGON_WALLET_PRIVATE_KEY=
|
||||
|
||||
# Tavily API Key for web search
|
||||
TAVILY_API_KEY=your_tavily_api_key_here
|
||||
|
||||
# Logging
|
||||
# --- Logging ---
|
||||
LOG_LEVEL=INFO
|
||||
|
||||
Reference in New Issue
Block a user