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
@@ -1,13 +1,40 @@
|
||||
<div align="center">
|
||||
|
||||
# Polymarket Whale Watcher
|
||||
|
||||
AI-powered whale trade surveillance and analysis system for Polymarket prediction markets. Combines real-time monitoring, multi-dimensional anomaly detection, LLM-driven investigation with 14 autonomous tools, and signal accuracy tracking.
|
||||
**AI-powered whale trade surveillance for Polymarket prediction markets**
|
||||
|
||||
[](https://www.python.org/downloads/)
|
||||
[](LICENSE)
|
||||
[](https://docs.polymarket.com/)
|
||||
|
||||
Real-time monitoring | Multi-dimensional anomaly detection | LLM investigation with 14 autonomous tools | Signal accuracy tracking
|
||||
|
||||
[Quick Start](#-quick-start) | [How It Works](#-how-it-works) | [Features](#-features) | [Configuration](#-configuration) | [Dashboard](#-dashboard)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## What It Does
|
||||
|
||||
Whale Watcher continuously monitors 50+ trending Polymarket markets, detects large trades with anomalous patterns, and uses an LLM agent with 14 autonomous research tools to investigate whether the trader may possess an information advantage. It tracks signal accuracy over time, achieving **63.5% win rate** with **+28.3% average ROI** on high-confidence signals.
|
||||
|
||||
```
|
||||
Trending Markets → Whale Detection → Anomaly Scoring → LLM Investigation → Signal Tracking
|
||||
(50+) ($1k-$100k+) (5 dimensions) (14 tools, 5 rounds) (win rate, ROI)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Demo
|
||||
|
||||
<details>
|
||||
<summary><b>Terminal Output</b> — Real-time whale detection and LLM analysis</summary>
|
||||
<details open>
|
||||
<summary><b>Terminal Output</b> — Real-time whale detection and analysis</summary>
|
||||
|
||||
```
|
||||
$ python -m src.main run
|
||||
|
||||
╭──────────────────────────────────────────────────────────╮
|
||||
│ 🐋 Polymarket Whale Watcher │
|
||||
│ │
|
||||
@@ -39,25 +66,25 @@ AI-powered whale trade surveillance and analysis system for Polymarket predictio
|
||||
→ "Over 9M committed to P2P" resolved YES — Signal CORRECT (ROI: +67%)
|
||||
```
|
||||
|
||||
See full example: [docs/examples/sample_terminal.txt](docs/examples/sample_terminal.txt)
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Analysis Report</b> — LLM investigation with tool-use</summary>
|
||||
<summary><b>Analysis Report</b> — LLM investigation with autonomous tool-use</summary>
|
||||
|
||||
Each whale trade generates a detailed markdown report:
|
||||
|
||||
- **Trade details** — amount, direction, price, trader wallet
|
||||
- **Trader profile** — rank, PnL, history, recent trades
|
||||
- **LLM investigation** — 5 autonomous tool calls (web, Twitter, Telegram, on-chain, DeFi)
|
||||
- **Trader profile** — leaderboard rank, PnL, history, recent trades
|
||||
- **LLM investigation** — autonomous tool calls (web, Twitter, Telegram, on-chain, DeFi)
|
||||
- **Information asymmetry assessment** — score, evidence, reasoning
|
||||
|
||||
Example findings:
|
||||
Example finding:
|
||||
> *"New ERC-20 contract deployed by MegaETH deployer wallet 6 hours before trade — not yet publicly announced. KOL tweets about insider knowledge preceded the trade by ~3 hours."*
|
||||
>
|
||||
> **Information Asymmetry Score: 0.72** | Trader Credibility: HIGH
|
||||
|
||||
See full example: [docs/examples/sample_report.md](docs/examples/sample_report.md)
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
@@ -68,7 +95,6 @@ Daily briefings include:
|
||||
- Price volatility alerts
|
||||
- Historical signal performance (win rate, ROI by confidence tier)
|
||||
|
||||
Example stats:
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Win Rate | **63.5%** |
|
||||
@@ -76,193 +102,294 @@ Example stats:
|
||||
| Signals with IAS >= 60% | 3 today |
|
||||
|
||||
See full example: [docs/examples/sample_briefing.md](docs/examples/sample_briefing.md)
|
||||
|
||||
</details>
|
||||
|
||||
## Features
|
||||
|
||||
- **Real-Time Monitoring** — Parallel per-market polling of 50+ trending markets
|
||||
- **Multi-Dimensional Anomaly Detection** — Scores trades on size, price uncertainty, time-of-day, trader deviation, and cluster signals
|
||||
- **Trader Profiling** — Leaderboard ranking, trading history, recent behavior analysis
|
||||
- **LLM Analysis with Tool-Use** — 14 autonomous tools (Twitter, web search, Telegram, crypto prices, stocks, economic data, Congress bills, DeFi metrics, on-chain analysis)
|
||||
- **Signal Accuracy Tracking** — Automatic market resolution checking, win rate stats by confidence tier
|
||||
- **Daily Intelligence Briefing** — Automated 10:00 AM daily summary with high-confidence signals
|
||||
- **Email Alerts** — Real-time notifications for high-IAS signals (>= 60%)
|
||||
- **Web Dashboard** — FastAPI-based signal performance dashboard
|
||||
- **Leading Signal Research** — "Price leads news" dataset collection
|
||||
---
|
||||
|
||||
## Quick Start
|
||||
|
||||
### One-Click Setup
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Configure environment
|
||||
cp .env.example .env
|
||||
# Edit .env with your API keys
|
||||
|
||||
# Start the whale watcher
|
||||
python -m src.main run
|
||||
|
||||
# With debug logging
|
||||
python -m src.main run --debug
|
||||
git clone https://github.com/chaoleiyv/polymarket-whale-watcher.git
|
||||
cd polymarket-whale-watcher
|
||||
chmod +x setup.sh && ./setup.sh
|
||||
```
|
||||
|
||||
The setup script will:
|
||||
1. Check Python 3.10+ is installed
|
||||
2. Create a virtual environment
|
||||
3. Install all dependencies
|
||||
4. Create `.env` from template
|
||||
|
||||
Then add your API key and start:
|
||||
|
||||
```bash
|
||||
# Add your Gemini API key (the only required key)
|
||||
echo "GEMINI_API_KEY=your_key_here" >> .env
|
||||
|
||||
# Activate the environment and run
|
||||
source venv/bin/activate
|
||||
python -m src.main run
|
||||
```
|
||||
|
||||
> **Get a free Gemini API key**: https://aistudio.google.com/apikey
|
||||
|
||||
### Docker
|
||||
|
||||
```bash
|
||||
docker build -t whale-watcher .
|
||||
docker run --env-file .env -v ./data:/app/data -v ./reports:/app/reports whale-watcher
|
||||
```
|
||||
|
||||
### Make Commands
|
||||
|
||||
```bash
|
||||
make setup # One-click setup
|
||||
make run # Start monitoring
|
||||
make run-debug # Start with debug logging
|
||||
make dashboard # Start web dashboard
|
||||
make markets # View trending markets
|
||||
make briefing # Generate today's briefing
|
||||
make help # Show all commands
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
|
||||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| **Real-Time Monitoring** | Parallel per-market polling of 50+ trending markets |
|
||||
| **Anomaly Detection** | 5-dimensional scoring: size, price uncertainty, time-of-day, trader deviation, cluster signals |
|
||||
| **Trader Profiling** | Leaderboard ranking, PnL, trading history, recent behavior |
|
||||
| **LLM Analysis** | 14 autonomous tools across 5 rounds of investigation |
|
||||
| **Signal Tracking** | Automatic market resolution checking, win rate stats by confidence tier |
|
||||
| **Daily Briefing** | Automated 10:00 AM summary with high-confidence signals |
|
||||
| **Email Alerts** | Real-time notifications for high information-asymmetry signals (>= 60%) |
|
||||
| **Web Dashboard** | FastAPI-based signal performance dashboard |
|
||||
| **Official API** | Works with Polymarket's public API — no private API access needed |
|
||||
|
||||
### 14 LLM Research Tools
|
||||
|
||||
The LLM agent autonomously selects and uses these tools during investigation:
|
||||
|
||||
| Category | Tools |
|
||||
|----------|-------|
|
||||
| **Social Sentiment** | `search_twitter`, `search_telegram`, `search_web` |
|
||||
| **Crypto Data** | `get_crypto_price`, `get_defi_metrics`, `get_token_unlocks` |
|
||||
| **Financial Data** | `get_stock_price`, `get_economic_indicators` |
|
||||
| **On-Chain** | `get_wallet_transactions`, `get_contract_info` |
|
||||
| **Legislation** | `search_congress` |
|
||||
| **Market Data** | `get_market_history`, `get_trader_positions` |
|
||||
|
||||
---
|
||||
|
||||
## How It Works
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
A[Polymarket API] --> B[Market Fetcher]
|
||||
B --> C[50+ Trending Markets]
|
||||
C --> D[Trade Monitor]
|
||||
D --> E{Whale Trade?}
|
||||
E -->|No| D
|
||||
E -->|Yes| F[Anomaly Detector]
|
||||
F --> G{Score > Threshold?}
|
||||
G -->|No| D
|
||||
G -->|Yes| H[LLM Analyzer]
|
||||
H --> I[14 Research Tools]
|
||||
I --> J[Signal + Report]
|
||||
J --> K[Resolution Tracker]
|
||||
K --> L[Stats Dashboard]
|
||||
```
|
||||
|
||||
### Pipeline
|
||||
|
||||
1. **Market Selection** — Fetches top trending markets by 24h volume from Polymarket, filters out sports/weather/short-term price markets, refreshes every 15 minutes
|
||||
|
||||
2. **Trade Monitoring** — Runs parallel async tasks per market, polls for new trades incrementally, deduplicates by transaction hash
|
||||
|
||||
3. **Anomaly Detection** — Multi-dimensional scoring on 5 axes:
|
||||
- **Size** — Trade size relative to market 24h volume
|
||||
- **Price uncertainty** — Closer to 0.5 = more interesting
|
||||
- **Time-of-day** — ET hour-based suspicion weights
|
||||
- **Trader deviation** — Trade size vs trader's historical average
|
||||
- **Cluster signal** — Same-direction trades within 5-minute window
|
||||
|
||||
4. **LLM Investigation** — Builds rich context (trade + trader profile + market data), LLM autonomously uses tools to investigate (up to 5 rounds), produces structured recommendation with information asymmetry score
|
||||
|
||||
5. **Signal Tracking** — Resolution tracker checks every 30 minutes for resolved markets, validates signal correctness, computes theoretical ROI, aggregates win rates by confidence tier
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
Copy `.env.example` to `.env` and configure:
|
||||
|
||||
**Required:**
|
||||
- `GEMINI_API_KEY` — Gemini API key for LLM analysis
|
||||
- `INTERNAL_API_URL` / `INTERNAL_API_KEY` — Trade data API (currently using internal API, can be replaced with [Polymarket CLOB API](https://docs.polymarket.com/))
|
||||
### Required
|
||||
|
||||
**Optional:**
|
||||
- `TAVILY_API_KEY` — Web search (primary)
|
||||
- `TWITTER_API_KEY` — Twitter sentiment search
|
||||
- `POLYGON_API_KEY` — Stock/ETF data
|
||||
- `FRED_API_KEY` — Economic indicators
|
||||
- `ETHERSCAN_API_KEY` — On-chain data
|
||||
- `EMAIL_*` — Email alert settings
|
||||
- `MIN_TRADE_SIZE_USD` — Minimum trade size (default: 1000)
|
||||
- `MIN_PRICE` / `MAX_PRICE` — Price range filter (default: 0-0.7)
|
||||
| Variable | Description | Get It |
|
||||
|----------|-------------|--------|
|
||||
| `GEMINI_API_KEY` | Gemini API key for LLM analysis | [Google AI Studio](https://aistudio.google.com/apikey) |
|
||||
|
||||
### Trade Data Source
|
||||
|
||||
| Variable | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `TRADE_API_MODE` | `official` | `official` = Polymarket public API (no auth needed), `internal` = private API |
|
||||
|
||||
The bot works out of the box with Polymarket's official public API. No private API access required.
|
||||
|
||||
### Optional (enhances analysis)
|
||||
|
||||
| Variable | Description | Get It |
|
||||
|----------|-------------|--------|
|
||||
| `TAVILY_API_KEY` | Web search (primary) | [tavily.com](https://tavily.com) |
|
||||
| `TWITTER_API_KEY` | Twitter sentiment search | [Twitter Developer](https://developer.twitter.com) |
|
||||
| `POLYGON_API_KEY` | Stock/ETF/forex data | [polygon.io](https://polygon.io) |
|
||||
| `FRED_API_KEY` | Economic indicators | [FRED](https://fred.stlouisfed.org/docs/api/api_key.html) |
|
||||
| `ETHERSCAN_API_KEY` | On-chain wallet analysis | [etherscan.io](https://etherscan.io/apis) |
|
||||
| `CONGRESS_API_KEY` | US legislation data | [congress.gov](https://api.congress.gov/) |
|
||||
|
||||
### Whale Detection Tuning
|
||||
|
||||
| Variable | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `MIN_TRADE_SIZE_USD` | `1000` | Minimum trade size to consider |
|
||||
| `MIN_PRICE` / `MAX_PRICE` | `0` / `0.7` | Price range filter |
|
||||
| `FETCH_INTERVAL_SECONDS` | `15` | Polling interval per market |
|
||||
| `TRENDING_MARKETS_LIMIT` | `50` | Number of markets to monitor |
|
||||
|
||||
---
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
# Start monitoring
|
||||
python -m src.main run [--debug]
|
||||
# Core
|
||||
python -m src.main run [--debug] # Start monitoring
|
||||
python -m src.main check-markets --limit 20 # View trending markets
|
||||
python -m src.main test-analyze <market_id> # Test LLM on a specific market
|
||||
|
||||
# Check trending markets
|
||||
python -m src.main check-markets --limit 20
|
||||
# Reports
|
||||
python -m src.main briefing --today # Generate today's briefing
|
||||
python -m src.main briefing --date 2026-04-17 # Briefing for a specific date
|
||||
|
||||
# Test LLM analysis on a specific market
|
||||
python -m src.main test-analyze <market_id>
|
||||
# Dashboard
|
||||
python -m src.main dashboard --port 8000 # Start web dashboard
|
||||
|
||||
# Generate daily briefing
|
||||
python -m src.main briefing --today
|
||||
python -m src.main briefing --date 2026-04-17
|
||||
|
||||
# Migrate legacy JSON signals to SQLite
|
||||
python -m src.main migrate
|
||||
|
||||
# Start web dashboard
|
||||
python -m src.main dashboard --port 8000
|
||||
# Maintenance
|
||||
python -m src.main migrate # Migrate legacy JSON to SQLite
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Dashboard
|
||||
|
||||
Start the web dashboard to view signal performance:
|
||||
|
||||
```bash
|
||||
python -m src.main dashboard
|
||||
# Open http://localhost:8000
|
||||
```
|
||||
|
||||
The dashboard shows:
|
||||
- Overall signal statistics (total signals, win rate, avg ROI)
|
||||
- Performance breakdown by confidence tier
|
||||
- Top best/worst signals by theoretical ROI
|
||||
- Paginated signal history
|
||||
|
||||
---
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
src/
|
||||
├── config/settings.py # Environment configuration (Pydantic)
|
||||
├── models/ # Data models
|
||||
│ ├── market.py # Market, TrendingMarket
|
||||
│ ├── trade.py # TradeActivity, WhaleTrade, TraderRanking
|
||||
│ ├── decision.py # TradeRecommendation, LLMDecision
|
||||
│ └── anomaly_signal.py # AnomalySignal (stored signal)
|
||||
├── services/ # Business logic (23 modules)
|
||||
│ ├── market_fetcher.py # Polymarket Gamma API
|
||||
│ ├── trade_monitor.py # Per-market parallel monitoring (official + internal API)
|
||||
│ ├── anomaly_detector.py # Multi-dimensional anomaly scoring
|
||||
│ ├── llm_analyzer.py # LLM with tool-use (14 tools, 5 rounds)
|
||||
│ ├── tools.py # Tool registry
|
||||
│ ├── resolution_tracker.py # Market resolution checking
|
||||
│ ├── stats_engine.py # Performance statistics
|
||||
│ ├── daily_briefing.py # Daily summary generation
|
||||
│ └── [data services] # Twitter, Telegram, CoinGecko, DeFiLlama,
|
||||
│ # FRED, Polygon, Etherscan, Congress, web search
|
||||
├── db/database.py # SQLite signal storage
|
||||
├── prompts/ # LLM system prompts & tool schemas
|
||||
├── dashboard.py # FastAPI web dashboard
|
||||
└── main.py # CLI entry point (Typer)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
Polymarket API Internal Trade API Gamma API
|
||||
| | |
|
||||
v v v
|
||||
MarketFetcher TradeMonitor PriceMonitor
|
||||
| | |
|
||||
v v v
|
||||
TrendingMarkets AnomalyDetector VolatilityAnalyzer
|
||||
|
|
||||
v
|
||||
LLMAnalyzer (14 tools)
|
||||
| |
|
||||
v v
|
||||
AnomalySignal Reports/Alerts
|
||||
|
|
||||
v
|
||||
ResolutionTracker → StatsEngine → Dashboard
|
||||
┌─────────────────────────────┐
|
||||
│ Polymarket Gamma API │
|
||||
│ (trending markets, prices) │
|
||||
└──────────────┬──────────────┘
|
||||
│
|
||||
┌──────────────▼──────────────┐
|
||||
│ Market Fetcher │
|
||||
│ (filter sports/weather/etc) │
|
||||
└──────────────┬──────────────┘
|
||||
│
|
||||
┌────────────────────▼────────────────────┐
|
||||
│ Trade Monitor (async) │
|
||||
│ 50+ parallel market polling tasks │
|
||||
│ Official API ←→ Internal API (switch) │
|
||||
└────────────────────┬────────────────────┘
|
||||
│
|
||||
┌────────────────────▼────────────────────┐
|
||||
│ Anomaly Detector │
|
||||
│ 5-axis scoring: size, price, time, │
|
||||
│ trader deviation, cluster signals │
|
||||
└────────────────────┬────────────────────┘
|
||||
│
|
||||
┌────────────────────▼────────────────────┐
|
||||
│ LLM Analyzer (Gemini) │
|
||||
│ 14 tools × 5 rounds of investigation │
|
||||
├─────────┬────────┬────────┬─────────────┤
|
||||
│ Twitter │ Web │ DeFi │ On-Chain │
|
||||
│Telegram │ Search │ Crypto │ Congress │
|
||||
└─────────┴───┬────┴────────┴─────────────┘
|
||||
│
|
||||
┌─────────────▼──────────────────────────┐
|
||||
│ Signal Storage (SQLite) │
|
||||
│ → Resolution Tracker (every 30min) │
|
||||
│ → Stats Engine (win rate, ROI) │
|
||||
│ → Dashboard (FastAPI) │
|
||||
│ → Email Alerts (IAS >= 60%) │
|
||||
└────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### Project Structure
|
||||
|
||||
```
|
||||
src/
|
||||
├── config/settings.py # Environment configuration
|
||||
├── models/
|
||||
│ ├── market.py # Market, TrendingMarket
|
||||
│ ├── trade.py # TradeActivity, WhaleTrade, TraderRanking
|
||||
│ ├── decision.py # TradeRecommendation, LLMDecision
|
||||
│ ├── anomaly_signal.py # AnomalySignal (stored signal)
|
||||
│ └── leading_signal.py # LeadingSignal (price leads news)
|
||||
├── services/
|
||||
│ ├── market_fetcher.py # Polymarket API, market filtering
|
||||
│ ├── trade_monitor.py # Per-market parallel monitoring
|
||||
│ ├── price_monitor.py # Volatility detection
|
||||
│ ├── anomaly_detector.py # Multi-dimensional anomaly scoring
|
||||
│ ├── llm_analyzer.py # LLM with tool-use (14 tools, 5 rounds max)
|
||||
│ ├── volatility_analyzer.py # Leading signal detection
|
||||
│ ├── trader_profiler.py # Trader profile generation
|
||||
│ ├── tools.py # Tool registry
|
||||
│ ├── daily_briefing.py # Daily summary generation
|
||||
│ ├── resolution_tracker.py # Market resolution checking
|
||||
│ ├── stats_engine.py # Performance statistics
|
||||
│ ├── anomaly_history.py # Signal storage (SQLite)
|
||||
│ ├── coingecko.py # Crypto prices
|
||||
│ ├── fred.py # Economic indicators (FRED)
|
||||
│ ├── polygon.py # Stock prices & news
|
||||
│ ├── congress.py # US legislation
|
||||
│ ├── defillama.py # DeFi TVL, revenue, token unlocks
|
||||
│ ├── etherscan.py # On-chain wallet analysis
|
||||
│ ├── twitter_search.py # Twitter API
|
||||
│ ├── telegram_search.py # Telegram channels
|
||||
│ └── web_search.py # Unified search (Tavily → Serper → DDG)
|
||||
├── db/database.py # SQLite signal storage
|
||||
├── prompts/
|
||||
│ ├── whale_analyzer.py # LLM system prompt & tool schemas
|
||||
│ └── volatility_analyzer.py # Volatility analysis prompt
|
||||
├── dashboard.py # FastAPI web dashboard
|
||||
└── main.py # Entry point (WhaleWatcher orchestrator)
|
||||
|
||||
data/ # SQLite database + processed transactions
|
||||
reports/ # Analysis reports (by date)
|
||||
daily_briefings/ # Daily intelligence summaries
|
||||
leading_signals/ # "Price leads news" research dataset
|
||||
price_volatility/ # Volatility alert records
|
||||
```
|
||||
|
||||
## How It Works
|
||||
|
||||
### 1. Market Selection
|
||||
- Fetches top trending markets by 24h volume from Polymarket Gamma API
|
||||
- Filters out sports, weather, and short-term price markets
|
||||
- Refreshes market list every 15 minutes
|
||||
|
||||
### 2. Trade Monitoring
|
||||
- Runs parallel async tasks per monitored market
|
||||
- Polls internal API incrementally (new trades since last check)
|
||||
- Rate-limited at 5 QPS to respect API limits
|
||||
- Deduplicates by transaction hash
|
||||
|
||||
### 3. Anomaly Detection
|
||||
Multi-dimensional scoring on 5 axes:
|
||||
- **Size** — Trade size relative to market 24h volume
|
||||
- **Price uncertainty** — Closer to 0.5 = more interesting
|
||||
- **Time-of-day** — ET hour-based suspicion weights
|
||||
- **Trader deviation** — Trade size vs trader's historical average
|
||||
- **Cluster signal** — Same-direction trades within 5-minute window
|
||||
|
||||
### 4. LLM Investigation
|
||||
When a whale trade triggers:
|
||||
1. Builds rich context: trade details + trader profile + market data + historical signals
|
||||
2. LLM autonomously uses tools to investigate (up to 5 rounds):
|
||||
- Search Twitter/Telegram for insider chatter
|
||||
- Check crypto prices, DeFi metrics, on-chain activity
|
||||
- Look up stock movements, economic data, Congress bills
|
||||
- Web search for breaking news
|
||||
3. Produces structured recommendation: action, confidence, information asymmetry score (0-1)
|
||||
4. Generates markdown report saved to `reports/`
|
||||
|
||||
### 5. Signal Tracking
|
||||
- Resolution tracker checks every 30 minutes for resolved markets
|
||||
- Validates signal correctness against actual outcomes
|
||||
- Computes theoretical ROI for each signal
|
||||
- Stats engine aggregates win rates by confidence tier
|
||||
---
|
||||
|
||||
## Safety
|
||||
|
||||
- Trade execution disabled by default (`ENABLE_TRADE_EXECUTION=false`)
|
||||
- Trade execution **disabled by default** (`ENABLE_TRADE_EXECUTION=false`)
|
||||
- Position size capped at 20% of balance if enabled
|
||||
- Minimum 60% confidence threshold for execution
|
||||
- Price range filter avoids obvious outcomes (0-0.7)
|
||||
- Price range filter avoids obvious outcomes
|
||||
- All decisions logged for audit trail
|
||||
- Rate limiting on all external APIs
|
||||
|
||||
## Disclaimer
|
||||
|
||||
This system is for research and educational purposes. Prediction market trading involves significant risk. Never trade with funds you cannot afford to lose. Always verify recommendations independently.
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
Reference in New Issue
Block a user