| name | clawpoly | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| description | Polymarket prediction market trading bot with Kelly criterion position sizing and multi-strategy scanning | ||||||||||||||
| homepage | https://github.com/OpenKrab/ClawPoly | ||||||||||||||
| user-invocable | true | ||||||||||||||
| metadata |
|
Integrate ClawPoly into OpenClaw agents to monitor and trade on Polymarket prediction markets. The bot scans 7500+ markets, identifies mispricings via multiple strategies (Value Betting, Cross Arbitrage, Market Making, Momentum), and sizes positions using Kelly Criterion.
The skill is part of the ClawPoly repository. Ensure:
-
Python 3.13+ is installed and on
PATH:python --version
-
ClawPoly is installed in
{baseDir}:cd {baseDir} pnpm install pnpm build -
Environment variables in
~/.openclaw/openclaw.json:{ "skills": { "entries": { "clawpoly": { "enabled": true, "apiKey": { "source": "env", "provider": "default", "id": "CLAUPOLY_PRIVATE_KEY" }, "env": { "CLAUPOLY_PRIVATE_KEY": "<your_private_key_here>" } } } } }
POLYGMARKET_WALLET_ADDRESS=0x...
POLYMARKET_PRIVATE_KEY=<private_key>
POLY_SCAN_INTERVAL=60
POLY_DRY_RUN=false{
"risk": {
"level": "moderate",
"max_position_pct": 10,
"max_concurrent": 5,
"min_edge_pct": 3,
"stop_loss_pct": 0.30
}
}Invoke via the nodes.run tool or direct shell execution:
python {baseDir}/src/main.py balanceShows USDC balance and open positions with P&L.
python {baseDir}/src/main.py scanScan all active markets without placing trades. Returns opportunities ranked by edge.
python {baseDir}/src/main.py markets [--search <query>]Browse active Polymarket categories or search specific markets.
python {baseDir}/src/main.py run --risk <conservative|moderate|aggressive>Start continuous scan → trade loop. Respects risk limits, Kelly sizing, and position caps.
python {baseDir}/src/main.py historyDisplay all executed trades, P&L, and realized gains/losses.
python {baseDir}/src/main.py configDisplay current risk settings, wallet, and strategy config.
The bot supports four trading strategies:
- Value Betting: Identifies mispriced events where outcome probabilities don't sum to 1.0
- Cross Arbitrage: Exploits price differences across related markets
- Market Making: Provides liquidity in high-volume markets (future)
- Momentum: Follows recent price trends (future)
All trades are gated by:
- Kelly Criterion: Position sizes = bankroll × edge ÷ odds (fractionally reduced to 75%)
- Max Position %: Cap per-trade exposure (configurable by risk level)
- Max Concurrent: Limit simultaneous positions (5–20 depending on risk)
- Stop Loss: Auto-close positions exceeding 30% loss
- Portfolio Guard: Minimum $0.50 balance required; halts trading if below
Conservative: 5% max position, 3 concurrent, 2% min edge
Moderate: 10% max position, 5 concurrent, 3% min edge
Aggressive: 20% max position, 10 concurrent, 1% min edge
- Environment variables (
CLAUPOLY_PRIVATE_KEY) .envfile (gitignored)- Secret management via
~/.openclaw/openclaw.json→ config.apiKey
Private key exposure = full wallet compromise. If exposed, transfer funds immediately.
User: "Show me current positions on Polymarket"
Agent: Runs `python {baseDir}/src/main.py balance` → displays holdings
User: "Scan for arbitrage opportunities"
Agent: Runs `python {baseDir}/src/main.py scan` → lists 900+ signals
User: "Start trading with moderate risk"
Agent: Runs `python {baseDir}/src/main.py run --risk moderate` → begins loop
"balance too low" error: Deposit USDC to wallet (min $0.50):
- Bridge USDC from Ethereum → Polygon
- Or buy USDC on Polygon via CEX (Coinbase, Kraken, Crypto.com)
API rate limits: Reduce POLY_SCAN_INTERVAL or check Gamma API status.
Wrong strategy signals: Review src/strategies/<strategy>/ for trigger conditions.