技能详情(站内镜像,无评论)
作者:AD88 @adlai88
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v2.2.2
统计:⭐ 3 · 1.5k · 12 current installs · 13 all-time installs
⭐ 3
安装量(当前) 13
🛡 VirusTotal :良性 · OpenClaw :可疑
Package:adlai88/polymarket-ai-divergence
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :可疑
OpenClaw 评估
The skill's code and packaging mostly match its trading description, but there are inconsistencies in metadata/docs and non-trivial risks (it needs a trading API key and can execute live trades), so review carefully before installing.
目的
The skill is a Polymarket/Simmer trading bot and the code requires SIMMER_API_KEY and the simmer-sdk package — this is coherent with the stated purpose of scanning divergences and executing trades. However the top-level registry metadata reported 'Required env vars: none' while clawhub.json and the code require SIMMER_API_KEY, which is an inconsistency that could confuse users.
说明范围
SKILL.md and the code instruct the agent to fetch divergence data, check market context/fees, size using Kelly, and execute trades via the Simmer SDK. The runtime instructions and code do not read arbitrary user files or unrelated credentials; they only read/write a local daily_spend.json and use SDK config APIs. The skill will place real trades when run with --live and requires an API key for that purpose.
安装机制
No remote download/install is used; clawhub.json declares a pip dependency on 'simmer-sdk' which the code imports. There are no obscure external URLs or archive extraction steps in the provided files.
证书
The only sensitive credential used is SIMMER_API_KEY (appropriate for a trading bot), but there are multiple inconsistencies across files and docs for environment variable names and defaults (e.g., SKILL.md shows SIMMER_DIVERGENCE_MAX_BET while code and clawhub.json use SIMMER_DIVERGENCE_MAX_BET_USD; defaults for min_edge and max bet differ between SKILL.md, code, and clawhub.json). This mismatch can lead to misconfiguration and accidental liv…
持久
The skill is not marked always:true. It is automaton-managed with an entrypoint and allows autonomous invocation (disable-model-invocation is false), which is expected for trading skills but increases blast radius: a compromised skill or misconfiguration + valid API key could place trades autonomously. The skill writes daily_spend.json and uses the SDK config path; it does not modify other skills' configs.
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Polymarket Ai Divergence」。简介:Find markets where Simmer's AI consensus diverges from the real market price, t…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/adlai88/polymarket-ai-divergence/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
name: polymarket-ai-divergence
description: Find markets where Simmer's AI consensus diverges from the real market price, then trade on the mispriced side using Kelly sizing. Scans for divergence, checks fees and safeguards, and executes trades on zero-fee markets with sufficient edge.
metadata:
author: Simmer (@simmer_markets)
version: "2.2.0"
displayName: Polymarket AI Divergence
difficulty: intermediate
---
# Polymarket AI Divergence Trader
Find markets where Simmer's AI consensus diverges from the real market price, then trade the edge.
> **This is a template.** The default logic trades when AI divergence exceeds 2% on zero-fee markets, using Kelly sizing capped at 25%. Remix it with different edge thresholds, sizing strategies, or additional filters (e.g., only trade markets resolving within 7 days). The skill handles plumbing (divergence scanning, fee checks, safeguards, execution). Your agent provides the alpha.
## What It Does
1. **Scans** all active markets for AI vs market price divergence
2. **Filters** to markets with edge above threshold (default 2%) and zero fees
3. **Checks** safeguards (flip-flop detection, existing positions)
4. **Sizes** using Kelly criterion, capped conservatively
5. **Executes** trades on the mispriced side (YES when AI is bullish, NO when bearish)
## Quick Commands
```bash
# Scan only (dry run, no trades)
python ai_divergence.py
# Scan + execute trades
python ai_divergence.py --live
# Only show bullish divergences
python ai_divergence.py --bullish
# Only >15% divergence
python ai_divergence.py --min 15
# JSON output
python ai_divergence.py --json
# Cron mode (quiet, trades only)
python ai_divergence.py --live --quiet
# Show config
python ai_divergence.py --config
# Update config
python ai_divergence.py --set max_bet_usd=10
```
## Configuration
| Key | Env Var | Default | Description |
|-----|---------|---------|-------------|
| `min_divergence` | `SIMMER_DIVERGENCE_MIN` | 5.0 | Min divergence % for scanner display |
| `min_edge` | `SIMMER_DIVERGENCE_MIN_EDGE` | 0.02 | Min divergence to trade (2%) |
| `max_bet_usd` | `SIMMER_DIVERGENCE_MAX_BET` | 5.0 | Max bet per trade |
| `max_trades_per_run` | `SIMMER_DIVERGENCE_MAX_TRADES` | 3 | Max trades per cycle |
| `kelly_cap` | `SIMMER_DIVERGENCE_KELLY_CAP` | 0.25 | Kelly fraction cap |
| `daily_budget` | `SIMMER_DIVERGENCE_DAILY_BUDGET` | 25.0 | Daily spend limit |
| `default_direction` | `SIMMER_DIVERGENCE_DIRECTION` | (both) | Filter: "bullish" or "bearish" |
Update via CLI: `python ai_divergence.py --set max_bet_usd=10`
## How It Works
### Divergence Signal
Each imported market has two prices:
- **AI consensus** (`current_probability`) — Simmer's AI consensus price, derived from multi-model ensemble forecasting
- **External price** (`external_price_yes`) — Real market price on Polymarket/Kalshi
`divergence = AI consensus - external price`
When divergence > 0: AI thinks the market is underpriced → buy YES
When divergence < 0: AI thinks the market is overpriced → buy NO
### Kelly Sizing
Position size uses the Kelly criterion:
```
kelly_fraction = edge / (1 - price)
position_size = kelly_fraction * max_bet_usd
```
Capped at `kelly_cap` (default 25%) to limit risk.
### Fee Filtering
75% of Polymarket markets have 0% fees. The remaining 25% charge 10% (short-duration crypto/sports). This skill **only trades zero-fee markets** to avoid fee drag eroding the edge.
### Safeguards
- **Fee check**: Skips markets with any taker fee
- **Flip-flop detection**: Uses SDK's context API to detect contradictory trades
- **Position check**: Skips markets where you already hold a position
- **Daily budget**: Stops trading when daily spend limit is reached
- **Kelly sizing**: Conservative sizing prevents over-betting
## API Endpoints Used
- `GET /api/sdk/markets/opportunities` — Divergence-ranked market list
- `GET /api/sdk/context/{market_id}` — Fee rate and safeguards per market
- `POST /api/sdk/trade` — Trade execution (via SDK client)
- `GET /api/sdk/positions` — Current portfolio positions
## Troubleshooting
**"No markets above min edge threshold"**
→ All divergences are below the `min_edge` setting. Lower it with `--set min_edge=0.01` or wait for larger divergences.
**"Daily budget exhausted"**
→ The skill has hit its daily spend limit. Adjust with `--set daily_budget=50`.
**All markets skipped for fees**
→ Only zero-fee markets are traded. If all available divergence opportunities have fees, no trades execute. This is by design.
**"context fetch failed"**
→ The SDK context endpoint is rate-limited (18 req/min). If running frequently, reduce `max_trades_per_run`.