← Back to Skills Marketplace
richducat

Polymarket Ai Divergence

by richducat · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
90
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install dolph-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, chec...
README (SKILL.md)

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

# 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 \x3C 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.

Usage Guidance
Key things to consider before installing or running: - This skill will place real trades via your Simmer account if run with --live. Provide SIMMER_API_KEY only if you intend to allow trading; consider using a restricted or test API key if available. - The top-level registry metadata is inconsistent: it claims no required env vars, but the code and clawhub.json require SIMMER_API_KEY and the simmer-sdk pip package. Treat that as a red flag and verify the package source and author identity before trusting it with funds. - Review the simmer-sdk package (pip) and the client's permissions — ensure it is the official SDK and not a trojanized fork. - Start in dry-run mode (no --live) to confirm scanner output and behavior. Use --json to inspect signals without placing trades. - Check and set conservative tunables: daily_budget, max_bet_usd, kelly_cap, and min_edge. The code enforces caps but defaults in clawhub.json and config.json vary; confirm which values your environment will use. - Consider running scripts/status.py to verify the API endpoint and that the key returns expected market data before enabling live trading. - If you do enable live trading, monitor the account closely and limit the key's privileges if the platform supports it. If you are uncomfortable with programmatic trading risk, do not supply credentials.
Capability Analysis
Type: OpenClaw Skill Name: dolph-ai-divergence Version: 1.0.0 The skill bundle is a functional trading bot designed to execute trades on prediction markets (Polymarket/Kalshi) based on AI divergence signals. The code in ai_divergence.py implements legitimate financial logic including Kelly criterion sizing, daily budget tracking via daily_spend.json, and fee-adjusted edge calculations. It interacts with the official Simmer AI API and uses a dedicated SDK (simmer-sdk). No evidence of data exfiltration, credential theft, or malicious prompt injection was found; the behavior is strictly aligned with the stated purpose in SKILL.md.
Capability Tags
cryptocan-make-purchases
Capability Assessment
Purpose & Capability
The skill is a Simmer/Polymarket trading bot and the code clearly requires SIMMER_API_KEY and the simmer-sdk Python package to operate — this is coherent with trading functionality. However, the top-level 'Requirements' in the provided registry metadata claimed no required env vars or credentials, which is incorrect. That metadata mismatch (manifest vs. files) is an integrity concern: the skill will actively trade on your account if provided credentials.
Instruction Scope
SKILL.md and the scripts instruct the agent to run ai_divergence.py (dry-run or --live). The runtime behavior is limited to fetching market/opportunity data, checking context/fees, computing sizes, persisting a local daily_spend.json, and calling the Simmer SDK to execute trades. The status script issues direct HTTP requests to SIMMER_API_URL. There are no instructions to read unrelated system files or exfiltrate arbitrary data, but the agent will have discretion to place real trades when run with --live.
Install Mechanism
No external download/extract install spec is present, and files reference a pip dependency (simmer-sdk) in clawhub.json. That is a normal package dependency for this purpose, not an arbitrary remote binary. Still, the package will be installed via pip (traceability recommended). There is no obfuscated code or network-hosted installers in the bundle.
Credentials
Functionally the skill only needs a Simmer API key (SIMMER_API_KEY) and optional envs (TRADING_VENUE, SIMMER_API_URL, AUTOMATON_MAX_BET, and several SIMMER_DIVERGENCE_* tunables). Requesting a single API key for trading is proportionate to the described capability, but the registry metadata incorrectly lists no required envs/primary credential. This mismatch could mislead users into installing without expecting to provide trading credentials.
Persistence & Privilege
The skill is not marked always:true and autostart is false. clawhub.json indicates an automaton entrypoint but it is 'managed' rather than force-enabled. The skill only writes a local daily_spend.json and does not modify other skills or system-wide configs. It does have the normal privilege of executing trades when invoked with --live, which is expected for a trading skill.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install dolph-ai-divergence
  3. After installation, invoke the skill by name or use /dolph-ai-divergence
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
polymarket-ai-divergence v2.2.0 (template): - New name and branding: formerly dolph-ai-divergence, now polymarket-ai-divergence by Simmer. - Added a detailed SKILL.md with full usage instructions, CLI options, and configuration explanations. - Highlights robust edge-based trading strategy using AI consensus vs. market price, with Kelly sizing and strict fee/position safeguards. - Trades only on zero-fee markets with sufficient AI edge (default 2%) and features dry-run, bullish-only, and JSON output modes. - CLI support for config updates and troubleshooting tips included.
Metadata
Slug dolph-ai-divergence
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Polymarket Ai Divergence?

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, chec... It is an AI Agent Skill for Claude Code / OpenClaw, with 90 downloads so far.

How do I install Polymarket Ai Divergence?

Run "/install dolph-ai-divergence" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Polymarket Ai Divergence free?

Yes, Polymarket Ai Divergence is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Polymarket Ai Divergence support?

Polymarket Ai Divergence is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Polymarket Ai Divergence?

It is built and maintained by richducat (@richducat); the current version is v1.0.0.

💬 Comments