# Send Polymarket Ai Divergence to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "polymarket-ai-divergence",
    "name": "Polymarket Ai Divergence",
    "source": "tencent",
    "type": "skill",
    "category": "数据分析",
    "sourceUrl": "https://clawhub.ai/adlai88/polymarket-ai-divergence",
    "canonicalUrl": "https://clawhub.ai/adlai88/polymarket-ai-divergence",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/polymarket-ai-divergence",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=polymarket-ai-divergence",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "ai_divergence.py",
      "clawhub.json",
      "scripts/status.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/polymarket-ai-divergence"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/polymarket-ai-divergence",
    "downloadUrl": "https://openagent3.xyz/downloads/polymarket-ai-divergence",
    "agentUrl": "https://openagent3.xyz/skills/polymarket-ai-divergence/agent",
    "manifestUrl": "https://openagent3.xyz/skills/polymarket-ai-divergence/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/polymarket-ai-divergence/agent.md"
  }
}
```
## Documentation

### 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

Scans all active markets for AI vs market price divergence
Filters to markets with edge above threshold (default 2%) and zero fees
Checks safeguards (flip-flop detection, existing positions)
Sizes using Kelly criterion, capped conservatively
Executes trades on the mispriced side (YES when AI is bullish, NO when bearish)

### Quick Commands

# 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

KeyEnv VarDefaultDescriptionmin_divergenceSIMMER_DIVERGENCE_MIN5.0Min divergence % for scanner displaymin_edgeSIMMER_DIVERGENCE_MIN_EDGE0.02Min divergence to trade (2%)max_bet_usdSIMMER_DIVERGENCE_MAX_BET5.0Max bet per trademax_trades_per_runSIMMER_DIVERGENCE_MAX_TRADES3Max trades per cyclekelly_capSIMMER_DIVERGENCE_KELLY_CAP0.25Kelly fraction capdaily_budgetSIMMER_DIVERGENCE_DAILY_BUDGET25.0Daily spend limitdefault_directionSIMMER_DIVERGENCE_DIRECTION(both)Filter: "bullish" or "bearish"

Update via CLI: python ai_divergence.py --set max_bet_usd=10

### 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.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: adlai88
- Version: 2.2.1
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-23T16:43:11.935Z
- Expires at: 2026-04-30T16:43:11.935Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/polymarket-ai-divergence)
- [Send to Agent page](https://openagent3.xyz/skills/polymarket-ai-divergence/agent)
- [JSON manifest](https://openagent3.xyz/skills/polymarket-ai-divergence/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/polymarket-ai-divergence/agent.md)
- [Download page](https://openagent3.xyz/downloads/polymarket-ai-divergence)