polymarket-auto-trader
Autonomous Polymarket prediction market trading agent. Scans markets, evaluates probabilities with LLM, sizes positions with Kelly criterion, and executes trades via CLOB API. Use when user wants to trade on Polymarket, set up automated prediction market trading, or build a trading bot. Supports cron-based autonomous operation, P&L tracking, and budget management.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/srikanthbellary/polymarket-auto-traderPolymarket Auto-Trader
Fully autonomous prediction market trading agent for Polymarket. Evaluates markets using LLM probability estimation, sizes positions with Kelly criterion, and executes trades via the Polymarket CLOB API from a non-US VPS.
Prerequisites
- Non-US VPS — Polymarket blocks US IPs. Use DigitalOcean Amsterdam, Hetzner EU, etc.
- Polygon wallet with USDC.e (bridged USDC, NOT native USDC)
- MATIC for gas (~0.1 MATIC sufficient for hundreds of trades)
- Anthropic API key (uses Haiku at ~$0.001/evaluation)
Setup
1. VPS Environment
SSH into your non-US VPS and run:
python3 {baseDir}/scripts/setup_vps.sh
Or manually:
apt update && apt install -y python3 python3-venv
python3 -m venv /opt/trader
/opt/trader/bin/pip install py-clob-client python-dotenv web3 requests
2. Configuration
Create /opt/trader/app/.env:
PRIVATE_KEY=<your-polygon-wallet-private-key>
LLM_API_KEY=<your-anthropic-api-key>
3. Blockchain Approvals
Before trading, approve USDC.e and CTF tokens for Polymarket contracts. Run:
python3 {baseDir}/scripts/approve_contracts.py
Required approvals (6 total):
- USDC.e → CTF Exchange, Neg Risk Exchange, Neg Risk Adapter
- CTF → CTF Exchange, Neg Risk Exchange, Neg Risk Adapter
4. Deploy Trading Script
cp {baseDir}/scripts/run_trade.py /opt/trader/app/
cp {baseDir}/scripts/pnl_tracker.py /opt/trader/app/
5. Cron Automation
crontab -e
# Add: */10 * * * * cd /opt/trader/app && /opt/trader/bin/python3 run_trade.py >> cron.log 2>&1
How It Works
- Market Scan — Fetches active markets from Gamma API, filters by liquidity and time horizon
- LLM Evaluation — Asks Claude Haiku to estimate true probability for each market
- Edge Detection — Compares LLM fair value vs market price (min 5% edge threshold)
- Kelly Sizing — Half-Kelly criterion with 25% max position size cap
- Order Execution — Places limit orders via CLOB API with GTC (good-till-cancelled)
- Dedup — Tracks all trades in
trades.jsonl, skips already-traded markets - Budget Control — Tracks LLM inference costs separately from trading capital
Trading Parameters
Configurable in run_trade.py:
EDGE_THRESHOLD— Minimum edge to trade (default: 0.05 = 5%)MIN_SHARES— Minimum order size (Polymarket requires ≥5 shares)- Bankroll allocation: 80% usable, 25% max per trade, 30% cap per single position
- Market horizon: Prioritizes markets ending within 30 days
Monitoring
Check P&L anytime:
python3 /opt/trader/app/pnl_tracker.py
Check recent activity:
tail -50 /opt/trader/app/cron.log
Key Technical Details
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-srikanthbellary-polymarket-auto-trader": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
binance-spot-trader
Autonomous Binance spot trading bot with LLM-powered market analysis. Supports momentum trading, mean reversion, and DCA strategies on any Binance spot pair. Use when user wants to trade on Binance, set up automated crypto trading, build a spot trading bot, or automate DCA buying. Features technical analysis, LLM sentiment evaluation, position sizing, and portfolio tracking.
solana-sniper-bot
Autonomous Solana token sniper and trading bot. Monitors new token launches on Raydium/Jupiter, evaluates rugpull risk with LLM analysis, auto-buys promising launches, and manages exit strategies. Use when user wants to snipe Solana token launches, trade memecoins, monitor new Solana pairs, or build a Solana trading bot. Supports cron-based monitoring, take-profit/stop-loss, and portfolio tracking.