{"id":"8fde92f7-bc4b-432b-abde-582cbb386fe8","entityType":"agent","slug":"clawhub-simmer-polymarket-ai-divergence","name":"Polymarket Ai Divergence","canonicalUrl":"https://www.xpersona.co/agent/clawhub-simmer-polymarket-ai-divergence","canonicalPath":"/agent/clawhub-simmer-polymarket-ai-divergence","generatedAt":"2026-10-09T18:53:05.366Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T09:10:07.513Z","emptyReason":null},"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...","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 3.2K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17eez0vajry6hjb97y9mbtv2s85wekv:polymarket-ai-divergence","sourceUrl":"https://clawhub.ai/simmer/polymarket-ai-divergence","homepage":"https://clawhub.ai/simmer/skills/polymarket-ai-divergence","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/simmer/polymarket-ai-divergence","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/simmer/skills/polymarket-ai-divergence","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":70,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Polymarket Ai Divergence technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T09:10:07.513Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T09:10:07.513Z","emptyReason":null},"stars":null,"forks":null,"downloads":3203,"packageName":null,"latestVersion":"2.3.0","tractionLabel":"3.2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T09:10:07.513Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T09:10:07.513Z","lastCrawledAt":"2026-10-09T09:10:07.513Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T09:10:07.513Z","lastVerifiedAt":null,"highlights":[{"version":"2.3.0","createdAt":"2026-04-25T09:20:10.731Z","changelog":"Migrate to Polymarket Gamma keyset pagination (deprecation deadline May 1, 2026). GammaClient.get_markets and get_events now return (list, next_cursor); get_market and get_event use keyset filter form. search() unchanged.","fileCount":7,"zipByteSize":16646},{"version":"2.2.9","createdAt":"2026-04-24T10:06:28.957Z","changelog":"polymarket-ai-divergence v2.2.9 - Updated metadata version in SKILL.md to 2.2.9 - No user-facing feature changes or command updates - Maintenance release for version consistency","fileCount":6,"zipByteSize":15184},{"version":"2.2.8","createdAt":"2026-04-22T09:15:08.777Z","changelog":"Schema fix: primaryEnv + envVars with required:false for optional credentials. Clears OpenClaw 'disproportionate requirements' verdict.","fileCount":6,"zipByteSize":14803},{"version":"2.2.7","createdAt":"2026-04-22T08:25:09.139Z","changelog":"Declare WALLET_PRIVATE_KEY in requires.env for OpenClaw moderation alignment.","fileCount":6,"zipByteSize":14653},{"version":"2.2.6","createdAt":"2026-04-16T10:05:20.159Z","changelog":"Add Setup Flow section with pip install simmer-sdk","fileCount":6,"zipByteSize":14638},{"version":"2.2.5","createdAt":"2026-04-07T13:28:35.805Z","changelog":"Inline gamma_api helper (was simmer_sdk.gamma_api before SDK 0.9.21 removed it). No behavior change.","fileCount":6,"zipByteSize":14337},{"version":"2.2.4","createdAt":"2026-04-03T02:46:56.436Z","changelog":"Add auto_redeem() call at start of each cycle for external wallet support","fileCount":5,"zipByteSize":10740},{"version":"2.2.3","createdAt":"2026-03-29T07:03:50.636Z","changelog":"- Updated internal logic in `ai_divergence.py` (implementation change; no user-facing configuration or documentation changes). - No updates to documentation or configuration in this version.","fileCount":5,"zipByteSize":10601}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17eez0vajry6hjb97y9mbtv2s85wekv:polymarket-ai-divergence","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17eez0vajry6hjb97y9mbtv2s85wekv:polymarket-ai-divergence` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/simmer/polymarket-ai-divergence before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-simmer-polymarket-ai-divergence/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-simmer-polymarket-ai-divergence/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-simmer-polymarket-ai-divergence/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-simmer-polymarket-ai-divergence/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-simmer-polymarket-ai-divergence/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-simmer-polymarket-ai-divergence/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T18:53:05.363Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-simmer-polymarket-ai-divergence/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-simmer-polymarket-ai-divergence/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-simmer-polymarket-ai-divergence/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-simmer-polymarket-ai-divergence/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T09:10:07.513Z","emptyReason":null},"readme":"Skill: Polymarket Ai Divergence\n\nOwner: simmer\n\nSummary: 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...\n\nTags: latest:2.3.0\n\nVersion history:\n\nv2.3.0 | 2026-04-25T09:20:10.731Z | user\n\nMigrate to Polymarket Gamma keyset pagination (deprecation deadline May 1, 2026). GammaClient.get_markets and get_events now return (list, next_cursor); get_market and get_event use keyset filter form. search() unchanged.\n\nv2.2.9 | 2026-04-24T10:06:28.957Z | auto\n\npolymarket-ai-divergence v2.2.9\n\n- Updated metadata version in SKILL.md to 2.2.9\n- No user-facing feature changes or command updates\n- Maintenance release for version consistency\n\nv2.2.8 | 2026-04-22T09:15:08.777Z | user\n\nSchema fix: primaryEnv + envVars with required:false for optional credentials. Clears OpenClaw 'disproportionate requirements' verdict.\n\nv2.2.7 | 2026-04-22T08:25:09.139Z | user\n\nDeclare WALLET_PRIVATE_KEY in requires.env for OpenClaw moderation alignment.\n\nv2.2.6 | 2026-04-16T10:05:20.159Z | user\n\nAdd Setup Flow section with pip install simmer-sdk\n\nv2.2.5 | 2026-04-07T13:28:35.805Z | user\n\nInline gamma_api helper (was simmer_sdk.gamma_api before SDK 0.9.21 removed it). No behavior change.\n\nv2.2.4 | 2026-04-03T02:46:56.436Z | user\n\nAdd auto_redeem() call at start of each cycle for external wallet support\n\nv2.2.3 | 2026-03-29T07:03:50.636Z | auto\n\n- Updated internal logic in `ai_divergence.py` (implementation change; no user-facing configuration or documentation changes).\n- No updates to documentation or configuration in this version.\n\nv2.2.2 | 2026-03-17T09:40:51.520Z | auto\n\n- Internal updates to ai_divergence.py with no user-facing changes.\n- SKILL version unchanged (remains at 2.2.0).\n- No updates to documentation or configuration.\n\nv2.2.1 | 2026-03-16T11:31:57.299Z | auto\n\n## v2.2.1 Changelog\n\n- Internal update to `ai_divergence.py`.\n- No changes to documentation or configuration.\n- No user-facing features or interface modifications.\n\nv2.2.0 | 2026-03-15T07:54:25.107Z | auto\n\n- Bumped version to 2.2.0\n- Updated SKILL.md metadata and version references\n- No user-facing behavioral changes detected in public documentation\n\nv2.1.1 | 2026-03-12T15:13:22.988Z | user\n\nFix env var drift: align CONFIG_SCHEMA with clawhub.json tunables for autotune compatibility\n\nv2.1.0 | 2026-03-05T13:27:26.947Z | user\n\nRename venue simmer to sim\n\nv2.0.7 | 2026-03-03T02:52:58.214Z | user\n\nAgentSkills format — moved platform config to clawhub.json for cross-agent compatibility\n\nv2.0.6 | 2026-02-27T10:04:37.029Z | auto\n\n- Added \"difficulty: intermediate\" to the SKILL.md metadata.\n- No core logic or functionality changes; documentation update only.\n\nv2.0.5 | 2026-02-27T05:51:27.079Z | auto\n\nNo changes detected in this version (2.0.5).  \n- No file changes or feature updates were made.\n- All functionality and documentation remain the same as the previous version.\n\nv2.0.4 | 2026-02-27T05:50:00.952Z | auto\n\n- Updated internal logic in `ai_divergence.py`.\n- No changes to user-facing documentation or configuration.\n- No API changes or new features introduced in this version.\n\nv2.0.3 | 2026-02-27T03:55:16.259Z | user\n\nAdd is_live_now field to Market dataclass; forward-compatible filter to skip not-yet-open markets\n\nv2.0.2 | 2026-02-25T13:56:36.305Z | auto\n\nNo file changes were detected in this version.\n\n- Version bump to 2.0.2 with no code or documentation changes.  \n- No user-facing functionality added, removed, or altered.\n\nv2.0.1 | 2026-02-25T13:46:20.665Z | auto\n\n- Updated SKILL.md to clarify that Simmer's AI consensus price is derived from multi-model ensemble forecasting.\n- No changes to core logic or functionality—documentation update only.\n\nv1.0.6 | 2026-02-24T12:31:30.238Z | auto\n\nVersion 2.0.0 introduces live trading with Kelly sizing and robust safeguards.\n\n- Adds automated trading: executes trades on zero-fee markets with AI vs market price divergence above 2%.\n- Implements Kelly criterion for position sizing, capped at 25% to limit risk.\n- Filters only to zero-fee markets to avoid fee drag.\n- Introduces safeguards: flip-flop detection, existing position checks, daily budget limits.\n- CLI now supports live mode, config inspection/updates, and more granular trade controls.\n\nv1.0.5 | 2026-02-20T07:26:01.390Z | user\n\nFilter noise: use /opportunities endpoint to exclude tracking-only markets where divergence is LMSR drift\n\nv1.0.4 | 2026-02-17T04:04:02.397Z | auto\n\n- Added simmer-sdk as a required pip dependency in metadata for easier setup.\n- Clarified that this skill is a template for customization and extension.\n- Removed the SIMMER_API_URL config from documentation; only SIMMER_API_KEY is now required.\n- Incremented version to 1.0.4 for these dependency and documentation improvements.\n\nv1.0.3 | 2026-02-14T14:59:03.600Z | auto\n\nPolymarket AI Divergence 1.0.3\n\n- Added SKILL.md documentation: comprehensive usage guide, configuration, API details, and example commands.\n- Clarifies how to interpret divergence signals between Simmer's AI and Polymarket prices.\n- Lists quick command-line options for scanning and filtering trading opportunities.\n- Includes troubleshooting tips for common setup issues.\n\nArchive index:\n\nArchive v2.3.0: 7 files, 16646 bytes\n\nFiles: ai_divergence.py (25386b), clawhub.json (1956b), gamma_api.py (12145b), scripts/status.py (2251b), skill-card.md (2350b), SKILL.md (5320b), _meta.json (143b)\n\nFile v2.3.0:SKILL.md\n\n---\nname: polymarket-ai-divergence\ndescription: 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.\nmetadata:\n  author: Simmer (@simmer_markets)\n  version: \"2.3.0\"\n  displayName: Polymarket AI Divergence\n  difficulty: intermediate\n---\n# Polymarket AI Divergence Trader\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade the edge.\n\n> **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.\n\n## What It Does\n\n1. **Scans** all active markets for AI vs market price divergence\n2. **Filters** to markets with edge above threshold (default 2%) and zero fees\n3. **Checks** safeguards (flip-flop detection, existing positions)\n4. **Sizes** using Kelly criterion, capped conservatively\n5. **Executes** trades on the mispriced side (YES when AI is bullish, NO when bearish)\n\n## Setup Flow\n\nWhen user asks to install or configure this skill:\n\n1. **Install the Simmer SDK**\n   ```bash\n   pip install simmer-sdk\n   ```\n\n2. **Ask for Simmer API key**\n   - They can get it from simmer.markets/dashboard → SDK tab\n   - Store in environment as `SIMMER_API_KEY`\n\n3. **Ask for wallet private key** (required for live trading)\n   - This is the private key for their Polymarket wallet (the wallet that holds USDC)\n   - Store in environment as `WALLET_PRIVATE_KEY`\n   - The SDK uses this to sign orders client-side automatically — no manual signing needed\n   - Not needed for $SIM paper trading on the Simmer venue\n\n## Quick Commands\n\n```bash\n# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10\n```\n\n## Configuration\n\n| Key | Env Var | Default | Description |\n|-----|---------|---------|-------------|\n| `min_divergence` | `SIMMER_DIVERGENCE_MIN` | 5.0 | Min divergence % for scanner display |\n| `min_edge` | `SIMMER_DIVERGENCE_MIN_EDGE` | 0.02 | Min divergence to trade (2%) |\n| `max_bet_usd` | `SIMMER_DIVERGENCE_MAX_BET` | 5.0 | Max bet per trade |\n| `max_trades_per_run` | `SIMMER_DIVERGENCE_MAX_TRADES` | 3 | Max trades per cycle |\n| `kelly_cap` | `SIMMER_DIVERGENCE_KELLY_CAP` | 0.25 | Kelly fraction cap |\n| `daily_budget` | `SIMMER_DIVERGENCE_DAILY_BUDGET` | 25.0 | Daily spend limit |\n| `default_direction` | `SIMMER_DIVERGENCE_DIRECTION` | (both) | Filter: \"bullish\" or \"bearish\" |\n\nUpdate via CLI: `python ai_divergence.py --set max_bet_usd=10`\n\n## How It Works\n\n### Divergence Signal\n\nEach imported market has two prices:\n- **AI consensus** (`current_probability`) — Simmer's AI consensus price, derived from multi-model ensemble forecasting\n- **External price** (`external_price_yes`) — Real market price on Polymarket/Kalshi\n\n`divergence = AI consensus - external price`\n\nWhen divergence > 0: AI thinks the market is underpriced → buy YES\nWhen divergence < 0: AI thinks the market is overpriced → buy NO\n\n### Kelly Sizing\n\nPosition size uses the Kelly criterion:\n```\nkelly_fraction = edge / (1 - price)\nposition_size = kelly_fraction * max_bet_usd\n```\nCapped at `kelly_cap` (default 25%) to limit risk.\n\n### Fee Filtering\n\n75% 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.\n\n### Safeguards\n\n- **Fee check**: Skips markets with any taker fee\n- **Flip-flop detection**: Uses SDK's context API to detect contradictory trades\n- **Position check**: Skips markets where you already hold a position\n- **Daily budget**: Stops trading when daily spend limit is reached\n- **Kelly sizing**: Conservative sizing prevents over-betting\n\n## API Endpoints Used\n\n- `GET /api/sdk/markets/opportunities` — Divergence-ranked market list\n- `GET /api/sdk/context/{market_id}` — Fee rate and safeguards per market\n- `POST /api/sdk/trade` — Trade execution (via SDK client)\n- `GET /api/sdk/positions` — Current portfolio positions\n\n## Troubleshooting\n\n**\"No markets above min edge threshold\"**\n→ All divergences are below the `min_edge` setting. Lower it with `--set min_edge=0.01` or wait for larger divergences.\n\n**\"Daily budget exhausted\"**\n→ The skill has hit its daily spend limit. Adjust with `--set daily_budget=50`.\n\n**All markets skipped for fees**\n→ Only zero-fee markets are traded. If all available divergence opportunities have fees, no trades execute. This is by design.\n\n**\"context fetch failed\"**\n→ The SDK context endpoint is rate-limited (18 req/min). If running frequently, reduce `max_trades_per_run`.\n\nFile v2.3.0:_meta.json\n\n{\n  \"ownerId\": \"kn7axnp7bzqsf5fkx0z8px7han7zyq1x\",\n  \"slug\": \"polymarket-ai-divergence\",\n  \"version\": \"2.3.0\",\n  \"publishedAt\": 1777108810731\n}\n\nFile v2.3.0:skill-card.md\n\n## Description:\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade on the mispriced side using Kelly sizing.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[simmer](https://clawhub.ai/user/simmer)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and trading agents use this skill to scan Polymarket and Kalshi-related market opportunities where Simmer AI consensus differs from external market prices, review divergence signals, and optionally execute position-sized trades.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Live mode can place real-money trades and the artifact may redeem positions automatically when run.\n\nMitigation: Review settings before execution, run dry scans first, and use a dedicated low-balance wallet with conservative max bet, daily budget, and trade count limits.\n\nRisk: WALLET_PRIVATE_KEY is highly sensitive when external-wallet trading is enabled.\n\nMitigation: Store private keys only in a trusted secret store or environment, never commit them, and rotate funds away from any exposed wallet.\n\nRisk: The current artifact should not be relied on to trade only zero-fee markets.\n\nMitigation: Verify fee checks and configured endpoints before live trading, and independently confirm market fees when real funds are at risk.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/simmer/skills/polymarket-ai-divergence)\n- [Simmer SDK API](https://api.simmer.markets)\n- [Polymarket Gamma API](https://gamma-api.polymarket.com)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, configuration, guidance]\n\n**Output Format:** [CLI text tables, Markdown instructions, and optional JSON output]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May place live trades when run with --live or when configured for a paper trading venue; requires SIMMER_API_KEY and may use WALLET_PRIVATE_KEY for external-wallet trading.]\n\n## Skill Version(s):\n\n2.3.0 (source: frontmatter, server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v2.3.0:clawhub.json\n\n{\n  \"emoji\": \"\\ud83d\\udd2e\",\n  \"primaryEnv\": \"SIMMER_API_KEY\",\n  \"requires\": {\n    \"env\": [\n      \"SIMMER_API_KEY\"\n    ],\n    \"pip\": [\n      \"simmer-sdk>=0.11.1\"\n    ]\n  },\n  \"envVars\": [\n    {\n      \"name\": \"SIMMER_API_KEY\",\n      \"required\": true,\n      \"description\": \"Your Simmer SDK API key \\u2014 get from simmer.markets/dashboard\"\n    },\n    {\n      \"name\": \"WALLET_PRIVATE_KEY\",\n      \"required\": false,\n      \"description\": \"Only needed for external-wallet self-custody trading. Not required when using managed wallets.\"\n    }\n  ],\n  \"cron\": null,\n  \"autostart\": false,\n  \"automaton\": {\n    \"managed\": true,\n    \"entrypoint\": \"ai_divergence.py\"\n  },\n  \"tunables\": [\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MIN_EDGE\",\n      \"type\": \"number\",\n      \"default\": 0.05,\n      \"range\": [\n        0.01,\n        0.3\n      ],\n      \"step\": 0.01,\n      \"label\": \"Minimum edge threshold\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_BET_USD\",\n      \"type\": \"number\",\n      \"default\": 50,\n      \"range\": [\n        1,\n        200\n      ],\n      \"step\": 5,\n      \"label\": \"Max bet per trade\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_KELLY_CAP\",\n      \"type\": \"number\",\n      \"default\": 0.25,\n      \"range\": [\n        0.01,\n        1.0\n      ],\n      \"step\": 0.01,\n      \"label\": \"Kelly fraction cap\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DAILY_BUDGET_USD\",\n      \"type\": \"number\",\n      \"default\": 100,\n      \"range\": [\n        10,\n        500\n      ],\n      \"step\": 10,\n      \"label\": \"Daily budget\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_TRADES_PER_RUN\",\n      \"type\": \"number\",\n      \"default\": 5,\n      \"range\": [\n        1,\n        20\n      ],\n      \"step\": 1,\n      \"label\": \"Max trades per run\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DIRECTION_FILTER\",\n      \"type\": \"enum\",\n      \"default\": \"any\",\n      \"options\": [\n        \"any\",\n        \"yes_only\",\n        \"no_only\"\n      ],\n      \"label\": \"Direction filter\"\n    }\n  ]\n}\n\nArchive v2.2.9: 6 files, 15184 bytes\n\nFiles: ai_divergence.py (25386b), clawhub.json (1956b), gamma_api.py (11383b), scripts/status.py (2251b), SKILL.md (5320b), _meta.json (143b)\n\nFile v2.2.9:SKILL.md\n\n---\nname: polymarket-ai-divergence\ndescription: 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.\nmetadata:\n  author: Simmer (@simmer_markets)\n  version: \"2.2.9\"\n  displayName: Polymarket AI Divergence\n  difficulty: intermediate\n---\n# Polymarket AI Divergence Trader\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade the edge.\n\n> **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.\n\n## What It Does\n\n1. **Scans** all active markets for AI vs market price divergence\n2. **Filters** to markets with edge above threshold (default 2%) and zero fees\n3. **Checks** safeguards (flip-flop detection, existing positions)\n4. **Sizes** using Kelly criterion, capped conservatively\n5. **Executes** trades on the mispriced side (YES when AI is bullish, NO when bearish)\n\n## Setup Flow\n\nWhen user asks to install or configure this skill:\n\n1. **Install the Simmer SDK**\n   ```bash\n   pip install simmer-sdk\n   ```\n\n2. **Ask for Simmer API key**\n   - They can get it from simmer.markets/dashboard → SDK tab\n   - Store in environment as `SIMMER_API_KEY`\n\n3. **Ask for wallet private key** (required for live trading)\n   - This is the private key for their Polymarket wallet (the wallet that holds USDC)\n   - Store in environment as `WALLET_PRIVATE_KEY`\n   - The SDK uses this to sign orders client-side automatically — no manual signing needed\n   - Not needed for $SIM paper trading on the Simmer venue\n\n## Quick Commands\n\n```bash\n# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10\n```\n\n## Configuration\n\n| Key | Env Var | Default | Description |\n|-----|---------|---------|-------------|\n| `min_divergence` | `SIMMER_DIVERGENCE_MIN` | 5.0 | Min divergence % for scanner display |\n| `min_edge` | `SIMMER_DIVERGENCE_MIN_EDGE` | 0.02 | Min divergence to trade (2%) |\n| `max_bet_usd` | `SIMMER_DIVERGENCE_MAX_BET` | 5.0 | Max bet per trade |\n| `max_trades_per_run` | `SIMMER_DIVERGENCE_MAX_TRADES` | 3 | Max trades per cycle |\n| `kelly_cap` | `SIMMER_DIVERGENCE_KELLY_CAP` | 0.25 | Kelly fraction cap |\n| `daily_budget` | `SIMMER_DIVERGENCE_DAILY_BUDGET` | 25.0 | Daily spend limit |\n| `default_direction` | `SIMMER_DIVERGENCE_DIRECTION` | (both) | Filter: \"bullish\" or \"bearish\" |\n\nUpdate via CLI: `python ai_divergence.py --set max_bet_usd=10`\n\n## How It Works\n\n### Divergence Signal\n\nEach imported market has two prices:\n- **AI consensus** (`current_probability`) — Simmer's AI consensus price, derived from multi-model ensemble forecasting\n- **External price** (`external_price_yes`) — Real market price on Polymarket/Kalshi\n\n`divergence = AI consensus - external price`\n\nWhen divergence > 0: AI thinks the market is underpriced → buy YES\nWhen divergence < 0: AI thinks the market is overpriced → buy NO\n\n### Kelly Sizing\n\nPosition size uses the Kelly criterion:\n```\nkelly_fraction = edge / (1 - price)\nposition_size = kelly_fraction * max_bet_usd\n```\nCapped at `kelly_cap` (default 25%) to limit risk.\n\n### Fee Filtering\n\n75% 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.\n\n### Safeguards\n\n- **Fee check**: Skips markets with any taker fee\n- **Flip-flop detection**: Uses SDK's context API to detect contradictory trades\n- **Position check**: Skips markets where you already hold a position\n- **Daily budget**: Stops trading when daily spend limit is reached\n- **Kelly sizing**: Conservative sizing prevents over-betting\n\n## API Endpoints Used\n\n- `GET /api/sdk/markets/opportunities` — Divergence-ranked market list\n- `GET /api/sdk/context/{market_id}` — Fee rate and safeguards per market\n- `POST /api/sdk/trade` — Trade execution (via SDK client)\n- `GET /api/sdk/positions` — Current portfolio positions\n\n## Troubleshooting\n\n**\"No markets above min edge threshold\"**\n→ All divergences are below the `min_edge` setting. Lower it with `--set min_edge=0.01` or wait for larger divergences.\n\n**\"Daily budget exhausted\"**\n→ The skill has hit its daily spend limit. Adjust with `--set daily_budget=50`.\n\n**All markets skipped for fees**\n→ Only zero-fee markets are traded. If all available divergence opportunities have fees, no trades execute. This is by design.\n\n**\"context fetch failed\"**\n→ The SDK context endpoint is rate-limited (18 req/min). If running frequently, reduce `max_trades_per_run`.\n\nFile v2.2.9:_meta.json\n\n{\n  \"ownerId\": \"kn7axnp7bzqsf5fkx0z8px7han7zyq1x\",\n  \"slug\": \"polymarket-ai-divergence\",\n  \"version\": \"2.2.9\",\n  \"publishedAt\": 1777025188957\n}\n\nFile v2.2.9:clawhub.json\n\n{\n  \"emoji\": \"\\ud83d\\udd2e\",\n  \"primaryEnv\": \"SIMMER_API_KEY\",\n  \"requires\": {\n    \"env\": [\n      \"SIMMER_API_KEY\"\n    ],\n    \"pip\": [\n      \"simmer-sdk>=0.11.1\"\n    ]\n  },\n  \"envVars\": [\n    {\n      \"name\": \"SIMMER_API_KEY\",\n      \"required\": true,\n      \"description\": \"Your Simmer SDK API key \\u2014 get from simmer.markets/dashboard\"\n    },\n    {\n      \"name\": \"WALLET_PRIVATE_KEY\",\n      \"required\": false,\n      \"description\": \"Only needed for external-wallet self-custody trading. Not required when using managed wallets.\"\n    }\n  ],\n  \"cron\": null,\n  \"autostart\": false,\n  \"automaton\": {\n    \"managed\": true,\n    \"entrypoint\": \"ai_divergence.py\"\n  },\n  \"tunables\": [\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MIN_EDGE\",\n      \"type\": \"number\",\n      \"default\": 0.05,\n      \"range\": [\n        0.01,\n        0.3\n      ],\n      \"step\": 0.01,\n      \"label\": \"Minimum edge threshold\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_BET_USD\",\n      \"type\": \"number\",\n      \"default\": 50,\n      \"range\": [\n        1,\n        200\n      ],\n      \"step\": 5,\n      \"label\": \"Max bet per trade\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_KELLY_CAP\",\n      \"type\": \"number\",\n      \"default\": 0.25,\n      \"range\": [\n        0.01,\n        1.0\n      ],\n      \"step\": 0.01,\n      \"label\": \"Kelly fraction cap\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DAILY_BUDGET_USD\",\n      \"type\": \"number\",\n      \"default\": 100,\n      \"range\": [\n        10,\n        500\n      ],\n      \"step\": 10,\n      \"label\": \"Daily budget\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_TRADES_PER_RUN\",\n      \"type\": \"number\",\n      \"default\": 5,\n      \"range\": [\n        1,\n        20\n      ],\n      \"step\": 1,\n      \"label\": \"Max trades per run\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DIRECTION_FILTER\",\n      \"type\": \"enum\",\n      \"default\": \"any\",\n      \"options\": [\n        \"any\",\n        \"yes_only\",\n        \"no_only\"\n      ],\n      \"label\": \"Direction filter\"\n    }\n  ]\n}\n\nArchive v2.2.8: 6 files, 14803 bytes\n\nFiles: ai_divergence.py (24099b), clawhub.json (1948b), gamma_api.py (11383b), scripts/status.py (2251b), SKILL.md (5320b), _meta.json (143b)\n\nFile v2.2.8:SKILL.md\n\n---\nname: polymarket-ai-divergence\ndescription: 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.\nmetadata:\n  author: Simmer (@simmer_markets)\n  version: \"2.2.8\"\n  displayName: Polymarket AI Divergence\n  difficulty: intermediate\n---\n# Polymarket AI Divergence Trader\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade the edge.\n\n> **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.\n\n## What It Does\n\n1. **Scans** all active markets for AI vs market price divergence\n2. **Filters** to markets with edge above threshold (default 2%) and zero fees\n3. **Checks** safeguards (flip-flop detection, existing positions)\n4. **Sizes** using Kelly criterion, capped conservatively\n5. **Executes** trades on the mispriced side (YES when AI is bullish, NO when bearish)\n\n## Setup Flow\n\nWhen user asks to install or configure this skill:\n\n1. **Install the Simmer SDK**\n   ```bash\n   pip install simmer-sdk\n   ```\n\n2. **Ask for Simmer API key**\n   - They can get it from simmer.markets/dashboard → SDK tab\n   - Store in environment as `SIMMER_API_KEY`\n\n3. **Ask for wallet private key** (required for live trading)\n   - This is the private key for their Polymarket wallet (the wallet that holds USDC)\n   - Store in environment as `WALLET_PRIVATE_KEY`\n   - The SDK uses this to sign orders client-side automatically — no manual signing needed\n   - Not needed for $SIM paper trading on the Simmer venue\n\n## Quick Commands\n\n```bash\n# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10\n```\n\n## Configuration\n\n| Key | Env Var | Default | Description |\n|-----|---------|---------|-------------|\n| `min_divergence` | `SIMMER_DIVERGENCE_MIN` | 5.0 | Min divergence % for scanner display |\n| `min_edge` | `SIMMER_DIVERGENCE_MIN_EDGE` | 0.02 | Min divergence to trade (2%) |\n| `max_bet_usd` | `SIMMER_DIVERGENCE_MAX_BET` | 5.0 | Max bet per trade |\n| `max_trades_per_run` | `SIMMER_DIVERGENCE_MAX_TRADES` | 3 | Max trades per cycle |\n| `kelly_cap` | `SIMMER_DIVERGENCE_KELLY_CAP` | 0.25 | Kelly fraction cap |\n| `daily_budget` | `SIMMER_DIVERGENCE_DAILY_BUDGET` | 25.0 | Daily spend limit |\n| `default_direction` | `SIMMER_DIVERGENCE_DIRECTION` | (both) | Filter: \"bullish\" or \"bearish\" |\n\nUpdate via CLI: `python ai_divergence.py --set max_bet_usd=10`\n\n## How It Works\n\n### Divergence Signal\n\nEach imported market has two prices:\n- **AI consensus** (`current_probability`) — Simmer's AI consensus price, derived from multi-model ensemble forecasting\n- **External price** (`external_price_yes`) — Real market price on Polymarket/Kalshi\n\n`divergence = AI consensus - external price`\n\nWhen divergence > 0: AI thinks the market is underpriced → buy YES\nWhen divergence < 0: AI thinks the market is overpriced → buy NO\n\n### Kelly Sizing\n\nPosition size uses the Kelly criterion:\n```\nkelly_fraction = edge / (1 - price)\nposition_size = kelly_fraction * max_bet_usd\n```\nCapped at `kelly_cap` (default 25%) to limit risk.\n\n### Fee Filtering\n\n75% 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.\n\n### Safeguards\n\n- **Fee check**: Skips markets with any taker fee\n- **Flip-flop detection**: Uses SDK's context API to detect contradictory trades\n- **Position check**: Skips markets where you already hold a position\n- **Daily budget**: Stops trading when daily spend limit is reached\n- **Kelly sizing**: Conservative sizing prevents over-betting\n\n## API Endpoints Used\n\n- `GET /api/sdk/markets/opportunities` — Divergence-ranked market list\n- `GET /api/sdk/context/{market_id}` — Fee rate and safeguards per market\n- `POST /api/sdk/trade` — Trade execution (via SDK client)\n- `GET /api/sdk/positions` — Current portfolio positions\n\n## Troubleshooting\n\n**\"No markets above min edge threshold\"**\n→ All divergences are below the `min_edge` setting. Lower it with `--set min_edge=0.01` or wait for larger divergences.\n\n**\"Daily budget exhausted\"**\n→ The skill has hit its daily spend limit. Adjust with `--set daily_budget=50`.\n\n**All markets skipped for fees**\n→ Only zero-fee markets are traded. If all available divergence opportunities have fees, no trades execute. This is by design.\n\n**\"context fetch failed\"**\n→ The SDK context endpoint is rate-limited (18 req/min). If running frequently, reduce `max_trades_per_run`.\n\nFile v2.2.8:_meta.json\n\n{\n  \"ownerId\": \"kn7axnp7bzqsf5fkx0z8px7han7zyq1x\",\n  \"slug\": \"polymarket-ai-divergence\",\n  \"version\": \"2.2.8\",\n  \"publishedAt\": 1776849308777\n}\n\nFile v2.2.8:clawhub.json\n\n{\n  \"emoji\": \"\\ud83d\\udd2e\",\n  \"primaryEnv\": \"SIMMER_API_KEY\",\n  \"requires\": {\n    \"env\": [\n      \"SIMMER_API_KEY\"\n    ],\n    \"pip\": [\n      \"simmer-sdk\"\n    ]\n  },\n  \"envVars\": [\n    {\n      \"name\": \"SIMMER_API_KEY\",\n      \"required\": true,\n      \"description\": \"Your Simmer SDK API key \\u2014 get from simmer.markets/dashboard\"\n    },\n    {\n      \"name\": \"WALLET_PRIVATE_KEY\",\n      \"required\": false,\n      \"description\": \"Only needed for external-wallet self-custody trading. Not required when using managed wallets.\"\n    }\n  ],\n  \"cron\": null,\n  \"autostart\": false,\n  \"automaton\": {\n    \"managed\": true,\n    \"entrypoint\": \"ai_divergence.py\"\n  },\n  \"tunables\": [\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MIN_EDGE\",\n      \"type\": \"number\",\n      \"default\": 0.05,\n      \"range\": [\n        0.01,\n        0.3\n      ],\n      \"step\": 0.01,\n      \"label\": \"Minimum edge threshold\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_BET_USD\",\n      \"type\": \"number\",\n      \"default\": 50,\n      \"range\": [\n        1,\n        200\n      ],\n      \"step\": 5,\n      \"label\": \"Max bet per trade\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_KELLY_CAP\",\n      \"type\": \"number\",\n      \"default\": 0.25,\n      \"range\": [\n        0.01,\n        1.0\n      ],\n      \"step\": 0.01,\n      \"label\": \"Kelly fraction cap\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DAILY_BUDGET_USD\",\n      \"type\": \"number\",\n      \"default\": 100,\n      \"range\": [\n        10,\n        500\n      ],\n      \"step\": 10,\n      \"label\": \"Daily budget\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_TRADES_PER_RUN\",\n      \"type\": \"number\",\n      \"default\": 5,\n      \"range\": [\n        1,\n        20\n      ],\n      \"step\": 1,\n      \"label\": \"Max trades per run\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DIRECTION_FILTER\",\n      \"type\": \"enum\",\n      \"default\": \"any\",\n      \"options\": [\n        \"any\",\n        \"yes_only\",\n        \"no_only\"\n      ],\n      \"label\": \"Direction filter\"\n    }\n  ]\n}\n\nArchive v2.2.7: 6 files, 14653 bytes\n\nFiles: ai_divergence.py (24099b), clawhub.json (1574b), gamma_api.py (11383b), scripts/status.py (2251b), SKILL.md (5320b), _meta.json (143b)\n\nFile v2.2.7:SKILL.md\n\n---\nname: polymarket-ai-divergence\ndescription: 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.\nmetadata:\n  author: Simmer (@simmer_markets)\n  version: \"2.2.7\"\n  displayName: Polymarket AI Divergence\n  difficulty: intermediate\n---\n# Polymarket AI Divergence Trader\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade the edge.\n\n> **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.\n\n## What It Does\n\n1. **Scans** all active markets for AI vs market price divergence\n2. **Filters** to markets with edge above threshold (default 2%) and zero fees\n3. **Checks** safeguards (flip-flop detection, existing positions)\n4. **Sizes** using Kelly criterion, capped conservatively\n5. **Executes** trades on the mispriced side (YES when AI is bullish, NO when bearish)\n\n## Setup Flow\n\nWhen user asks to install or configure this skill:\n\n1. **Install the Simmer SDK**\n   ```bash\n   pip install simmer-sdk\n   ```\n\n2. **Ask for Simmer API key**\n   - They can get it from simmer.markets/dashboard → SDK tab\n   - Store in environment as `SIMMER_API_KEY`\n\n3. **Ask for wallet private key** (required for live trading)\n   - This is the private key for their Polymarket wallet (the wallet that holds USDC)\n   - Store in environment as `WALLET_PRIVATE_KEY`\n   - The SDK uses this to sign orders client-side automatically — no manual signing needed\n   - Not needed for $SIM paper trading on the Simmer venue\n\n## Quick Commands\n\n```bash\n# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10\n```\n\n## Configuration\n\n| Key | Env Var | Default | Description |\n|-----|---------|---------|-------------|\n| `min_divergence` | `SIMMER_DIVERGENCE_MIN` | 5.0 | Min divergence % for scanner display |\n| `min_edge` | `SIMMER_DIVERGENCE_MIN_EDGE` | 0.02 | Min divergence to trade (2%) |\n| `max_bet_usd` | `SIMMER_DIVERGENCE_MAX_BET` | 5.0 | Max bet per trade |\n| `max_trades_per_run` | `SIMMER_DIVERGENCE_MAX_TRADES` | 3 | Max trades per cycle |\n| `kelly_cap` | `SIMMER_DIVERGENCE_KELLY_CAP` | 0.25 | Kelly fraction cap |\n| `daily_budget` | `SIMMER_DIVERGENCE_DAILY_BUDGET` | 25.0 | Daily spend limit |\n| `default_direction` | `SIMMER_DIVERGENCE_DIRECTION` | (both) | Filter: \"bullish\" or \"bearish\" |\n\nUpdate via CLI: `python ai_divergence.py --set max_bet_usd=10`\n\n## How It Works\n\n### Divergence Signal\n\nEach imported market has two prices:\n- **AI consensus** (`current_probability`) — Simmer's AI consensus price, derived from multi-model ensemble forecasting\n- **External price** (`external_price_yes`) — Real market price on Polymarket/Kalshi\n\n`divergence = AI consensus - external price`\n\nWhen divergence > 0: AI thinks the market is underpriced → buy YES\nWhen divergence < 0: AI thinks the market is overpriced → buy NO\n\n### Kelly Sizing\n\nPosition size uses the Kelly criterion:\n```\nkelly_fraction = edge / (1 - price)\nposition_size = kelly_fraction * max_bet_usd\n```\nCapped at `kelly_cap` (default 25%) to limit risk.\n\n### Fee Filtering\n\n75% 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.\n\n### Safeguards\n\n- **Fee check**: Skips markets with any taker fee\n- **Flip-flop detection**: Uses SDK's context API to detect contradictory trades\n- **Position check**: Skips markets where you already hold a position\n- **Daily budget**: Stops trading when daily spend limit is reached\n- **Kelly sizing**: Conservative sizing prevents over-betting\n\n## API Endpoints Used\n\n- `GET /api/sdk/markets/opportunities` — Divergence-ranked market list\n- `GET /api/sdk/context/{market_id}` — Fee rate and safeguards per market\n- `POST /api/sdk/trade` — Trade execution (via SDK client)\n- `GET /api/sdk/positions` — Current portfolio positions\n\n## Troubleshooting\n\n**\"No markets above min edge threshold\"**\n→ All divergences are below the `min_edge` setting. Lower it with `--set min_edge=0.01` or wait for larger divergences.\n\n**\"Daily budget exhausted\"**\n→ The skill has hit its daily spend limit. Adjust with `--set daily_budget=50`.\n\n**All markets skipped for fees**\n→ Only zero-fee markets are traded. If all available divergence opportunities have fees, no trades execute. This is by design.\n\n**\"context fetch failed\"**\n→ The SDK context endpoint is rate-limited (18 req/min). If running frequently, reduce `max_trades_per_run`.\n\nFile v2.2.7:_meta.json\n\n{\n  \"ownerId\": \"kn7axnp7bzqsf5fkx0z8px7han7zyq1x\",\n  \"slug\": \"polymarket-ai-divergence\",\n  \"version\": \"2.2.7\",\n  \"publishedAt\": 1776846309139\n}\n\nFile v2.2.7:clawhub.json\n\n{\n  \"emoji\": \"\\ud83d\\udd2e\",\n  \"requires\": {\n    \"env\": [\n      \"SIMMER_API_KEY\",\n      \"WALLET_PRIVATE_KEY\"\n    ],\n    \"pip\": [\n      \"simmer-sdk\"\n    ]\n  },\n  \"cron\": null,\n  \"autostart\": false,\n  \"automaton\": {\n    \"managed\": true,\n    \"entrypoint\": \"ai_divergence.py\"\n  },\n  \"tunables\": [\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MIN_EDGE\",\n      \"type\": \"number\",\n      \"default\": 0.05,\n      \"range\": [\n        0.01,\n        0.3\n      ],\n      \"step\": 0.01,\n      \"label\": \"Minimum edge threshold\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_BET_USD\",\n      \"type\": \"number\",\n      \"default\": 50,\n      \"range\": [\n        1,\n        200\n      ],\n      \"step\": 5,\n      \"label\": \"Max bet per trade\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_KELLY_CAP\",\n      \"type\": \"number\",\n      \"default\": 0.25,\n      \"range\": [\n        0.01,\n        1.0\n      ],\n      \"step\": 0.01,\n      \"label\": \"Kelly fraction cap\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DAILY_BUDGET_USD\",\n      \"type\": \"number\",\n      \"default\": 100,\n      \"range\": [\n        10,\n        500\n      ],\n      \"step\": 10,\n      \"label\": \"Daily budget\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_TRADES_PER_RUN\",\n      \"type\": \"number\",\n      \"default\": 5,\n      \"range\": [\n        1,\n        20\n      ],\n      \"step\": 1,\n      \"label\": \"Max trades per run\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DIRECTION_FILTER\",\n      \"type\": \"enum\",\n      \"default\": \"any\",\n      \"options\": [\n        \"any\",\n        \"yes_only\",\n        \"no_only\"\n      ],\n      \"label\": \"Direction filter\"\n    }\n  ]\n}\n\nArchive v2.2.6: 6 files, 14638 bytes\n\nFiles: ai_divergence.py (24099b), clawhub.json (1546b), gamma_api.py (11383b), scripts/status.py (2251b), SKILL.md (5320b), _meta.json (143b)\n\nFile v2.2.6:SKILL.md\n\n---\nname: polymarket-ai-divergence\ndescription: 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.\nmetadata:\n  author: Simmer (@simmer_markets)\n  version: \"2.2.5\"\n  displayName: Polymarket AI Divergence\n  difficulty: intermediate\n---\n# Polymarket AI Divergence Trader\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade the edge.\n\n> **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.\n\n## What It Does\n\n1. **Scans** all active markets for AI vs market price divergence\n2. **Filters** to markets with edge above threshold (default 2%) and zero fees\n3. **Checks** safeguards (flip-flop detection, existing positions)\n4. **Sizes** using Kelly criterion, capped conservatively\n5. **Executes** trades on the mispriced side (YES when AI is bullish, NO when bearish)\n\n## Setup Flow\n\nWhen user asks to install or configure this skill:\n\n1. **Install the Simmer SDK**\n   ```bash\n   pip install simmer-sdk\n   ```\n\n2. **Ask for Simmer API key**\n   - They can get it from simmer.markets/dashboard → SDK tab\n   - Store in environment as `SIMMER_API_KEY`\n\n3. **Ask for wallet private key** (required for live trading)\n   - This is the private key for their Polymarket wallet (the wallet that holds USDC)\n   - Store in environment as `WALLET_PRIVATE_KEY`\n   - The SDK uses this to sign orders client-side automatically — no manual signing needed\n   - Not needed for $SIM paper trading on the Simmer venue\n\n## Quick Commands\n\n```bash\n# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10\n```\n\n## Configuration\n\n| Key | Env Var | Default | Description |\n|-----|---------|---------|-------------|\n| `min_divergence` | `SIMMER_DIVERGENCE_MIN` | 5.0 | Min divergence % for scanner display |\n| `min_edge` | `SIMMER_DIVERGENCE_MIN_EDGE` | 0.02 | Min divergence to trade (2%) |\n| `max_bet_usd` | `SIMMER_DIVERGENCE_MAX_BET` | 5.0 | Max bet per trade |\n| `max_trades_per_run` | `SIMMER_DIVERGENCE_MAX_TRADES` | 3 | Max trades per cycle |\n| `kelly_cap` | `SIMMER_DIVERGENCE_KELLY_CAP` | 0.25 | Kelly fraction cap |\n| `daily_budget` | `SIMMER_DIVERGENCE_DAILY_BUDGET` | 25.0 | Daily spend limit |\n| `default_direction` | `SIMMER_DIVERGENCE_DIRECTION` | (both) | Filter: \"bullish\" or \"bearish\" |\n\nUpdate via CLI: `python ai_divergence.py --set max_bet_usd=10`\n\n## How It Works\n\n### Divergence Signal\n\nEach imported market has two prices:\n- **AI consensus** (`current_probability`) — Simmer's AI consensus price, derived from multi-model ensemble forecasting\n- **External price** (`external_price_yes`) — Real market price on Polymarket/Kalshi\n\n`divergence = AI consensus - external price`\n\nWhen divergence > 0: AI thinks the market is underpriced → buy YES\nWhen divergence < 0: AI thinks the market is overpriced → buy NO\n\n### Kelly Sizing\n\nPosition size uses the Kelly criterion:\n```\nkelly_fraction = edge / (1 - price)\nposition_size = kelly_fraction * max_bet_usd\n```\nCapped at `kelly_cap` (default 25%) to limit risk.\n\n### Fee Filtering\n\n75% 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.\n\n### Safeguards\n\n- **Fee check**: Skips markets with any taker fee\n- **Flip-flop detection**: Uses SDK's context API to detect contradictory trades\n- **Position check**: Skips markets where you already hold a position\n- **Daily budget**: Stops trading when daily spend limit is reached\n- **Kelly sizing**: Conservative sizing prevents over-betting\n\n## API Endpoints Used\n\n- `GET /api/sdk/markets/opportunities` — Divergence-ranked market list\n- `GET /api/sdk/context/{market_id}` — Fee rate and safeguards per market\n- `POST /api/sdk/trade` — Trade execution (via SDK client)\n- `GET /api/sdk/positions` — Current portfolio positions\n\n## Troubleshooting\n\n**\"No markets above min edge threshold\"**\n→ All divergences are below the `min_edge` setting. Lower it with `--set min_edge=0.01` or wait for larger divergences.\n\n**\"Daily budget exhausted\"**\n→ The skill has hit its daily spend limit. Adjust with `--set daily_budget=50`.\n\n**All markets skipped for fees**\n→ Only zero-fee markets are traded. If all available divergence opportunities have fees, no trades execute. This is by design.\n\n**\"context fetch failed\"**\n→ The SDK context endpoint is rate-limited (18 req/min). If running frequently, reduce `max_trades_per_run`.\n\nFile v2.2.6:_meta.json\n\n{\n  \"ownerId\": \"kn7axnp7bzqsf5fkx0z8px7han7zyq1x\",\n  \"slug\": \"polymarket-ai-divergence\",\n  \"version\": \"2.2.6\",\n  \"publishedAt\": 1776333920159\n}\n\nFile v2.2.6:clawhub.json\n\n{\n  \"emoji\": \"\\ud83d\\udd2e\",\n  \"requires\": {\n    \"env\": [\n      \"SIMMER_API_KEY\"\n    ],\n    \"pip\": [\n      \"simmer-sdk\"\n    ]\n  },\n  \"cron\": null,\n  \"autostart\": false,\n  \"automaton\": {\n    \"managed\": true,\n    \"entrypoint\": \"ai_divergence.py\"\n  },\n  \"tunables\": [\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MIN_EDGE\",\n      \"type\": \"number\",\n      \"default\": 0.05,\n      \"range\": [\n        0.01,\n        0.3\n      ],\n      \"step\": 0.01,\n      \"label\": \"Minimum edge threshold\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_BET_USD\",\n      \"type\": \"number\",\n      \"default\": 50,\n      \"range\": [\n        1,\n        200\n      ],\n      \"step\": 5,\n      \"label\": \"Max bet per trade\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_KELLY_CAP\",\n      \"type\": \"number\",\n      \"default\": 0.25,\n      \"range\": [\n        0.01,\n        1.0\n      ],\n      \"step\": 0.01,\n      \"label\": \"Kelly fraction cap\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DAILY_BUDGET_USD\",\n      \"type\": \"number\",\n      \"default\": 100,\n      \"range\": [\n        10,\n        500\n      ],\n      \"step\": 10,\n      \"label\": \"Daily budget\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_TRADES_PER_RUN\",\n      \"type\": \"number\",\n      \"default\": 5,\n      \"range\": [\n        1,\n        20\n      ],\n      \"step\": 1,\n      \"label\": \"Max trades per run\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DIRECTION_FILTER\",\n      \"type\": \"enum\",\n      \"default\": \"any\",\n      \"options\": [\n        \"any\",\n        \"yes_only\",\n        \"no_only\"\n      ],\n      \"label\": \"Direction filter\"\n    }\n  ]\n}\n\nArchive v2.2.5: 6 files, 14337 bytes\n\nFiles: ai_divergence.py (24099b), clawhub.json (1546b), gamma_api.py (11383b), scripts/status.py (2251b), SKILL.md (4687b), _meta.json (143b)\n\nFile v2.2.5:SKILL.md\n\n---\nname: polymarket-ai-divergence\ndescription: 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.\nmetadata:\n  author: Simmer (@simmer_markets)\n  version: \"2.2.5\"\n  displayName: Polymarket AI Divergence\n  difficulty: intermediate\n---\n# Polymarket AI Divergence Trader\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade the edge.\n\n> **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.\n\n## What It Does\n\n1. **Scans** all active markets for AI vs market price divergence\n2. **Filters** to markets with edge above threshold (default 2%) and zero fees\n3. **Checks** safeguards (flip-flop detection, existing positions)\n4. **Sizes** using Kelly criterion, capped conservatively\n5. **Executes** trades on the mispriced side (YES when AI is bullish, NO when bearish)\n\n## Quick Commands\n\n```bash\n# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10\n```\n\n## Configuration\n\n| Key | Env Var | Default | Description |\n|-----|---------|---------|-------------|\n| `min_divergence` | `SIMMER_DIVERGENCE_MIN` | 5.0 | Min divergence % for scanner display |\n| `min_edge` | `SIMMER_DIVERGENCE_MIN_EDGE` | 0.02 | Min divergence to trade (2%) |\n| `max_bet_usd` | `SIMMER_DIVERGENCE_MAX_BET` | 5.0 | Max bet per trade |\n| `max_trades_per_run` | `SIMMER_DIVERGENCE_MAX_TRADES` | 3 | Max trades per cycle |\n| `kelly_cap` | `SIMMER_DIVERGENCE_KELLY_CAP` | 0.25 | Kelly fraction cap |\n| `daily_budget` | `SIMMER_DIVERGENCE_DAILY_BUDGET` | 25.0 | Daily spend limit |\n| `default_direction` | `SIMMER_DIVERGENCE_DIRECTION` | (both) | Filter: \"bullish\" or \"bearish\" |\n\nUpdate via CLI: `python ai_divergence.py --set max_bet_usd=10`\n\n## How It Works\n\n### Divergence Signal\n\nEach imported market has two prices:\n- **AI consensus** (`current_probability`) — Simmer's AI consensus price, derived from multi-model ensemble forecasting\n- **External price** (`external_price_yes`) — Real market price on Polymarket/Kalshi\n\n`divergence = AI consensus - external price`\n\nWhen divergence > 0: AI thinks the market is underpriced → buy YES\nWhen divergence < 0: AI thinks the market is overpriced → buy NO\n\n### Kelly Sizing\n\nPosition size uses the Kelly criterion:\n```\nkelly_fraction = edge / (1 - price)\nposition_size = kelly_fraction * max_bet_usd\n```\nCapped at `kelly_cap` (default 25%) to limit risk.\n\n### Fee Filtering\n\n75% 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.\n\n### Safeguards\n\n- **Fee check**: Skips markets with any taker fee\n- **Flip-flop detection**: Uses SDK's context API to detect contradictory trades\n- **Position check**: Skips markets where you already hold a position\n- **Daily budget**: Stops trading when daily spend limit is reached\n- **Kelly sizing**: Conservative sizing prevents over-betting\n\n## API Endpoints Used\n\n- `GET /api/sdk/markets/opportunities` — Divergence-ranked market list\n- `GET /api/sdk/context/{market_id}` — Fee rate and safeguards per market\n- `POST /api/sdk/trade` — Trade execution (via SDK client)\n- `GET /api/sdk/positions` — Current portfolio positions\n\n## Troubleshooting\n\n**\"No markets above min edge threshold\"**\n→ All divergences are below the `min_edge` setting. Lower it with `--set min_edge=0.01` or wait for larger divergences.\n\n**\"Daily budget exhausted\"**\n→ The skill has hit its daily spend limit. Adjust with `--set daily_budget=50`.\n\n**All markets skipped for fees**\n→ Only zero-fee markets are traded. If all available divergence opportunities have fees, no trades execute. This is by design.\n\n**\"context fetch failed\"**\n→ The SDK context endpoint is rate-limited (18 req/min). If running frequently, reduce `max_trades_per_run`.\n\nFile v2.2.5:_meta.json\n\n{\n  \"ownerId\": \"kn7axnp7bzqsf5fkx0z8px7han7zyq1x\",\n  \"slug\": \"polymarket-ai-divergence\",\n  \"version\": \"2.2.5\",\n  \"publishedAt\": 1775568515805\n}\n\nFile v2.2.5:clawhub.json\n\n{\n  \"emoji\": \"\\ud83d\\udd2e\",\n  \"requires\": {\n    \"env\": [\n      \"SIMMER_API_KEY\"\n    ],\n    \"pip\": [\n      \"simmer-sdk\"\n    ]\n  },\n  \"cron\": null,\n  \"autostart\": false,\n  \"automaton\": {\n    \"managed\": true,\n    \"entrypoint\": \"ai_divergence.py\"\n  },\n  \"tunables\": [\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MIN_EDGE\",\n      \"type\": \"number\",\n      \"default\": 0.05,\n      \"range\": [\n        0.01,\n        0.3\n      ],\n      \"step\": 0.01,\n      \"label\": \"Minimum edge threshold\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_BET_USD\",\n      \"type\": \"number\",\n      \"default\": 50,\n      \"range\": [\n        1,\n        200\n      ],\n      \"step\": 5,\n      \"label\": \"Max bet per trade\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_KELLY_CAP\",\n      \"type\": \"number\",\n      \"default\": 0.25,\n      \"range\": [\n        0.01,\n        1.0\n      ],\n      \"step\": 0.01,\n      \"label\": \"Kelly fraction cap\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DAILY_BUDGET_USD\",\n      \"type\": \"number\",\n      \"default\": 100,\n      \"range\": [\n        10,\n        500\n      ],\n      \"step\": 10,\n      \"label\": \"Daily budget\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_TRADES_PER_RUN\",\n      \"type\": \"number\",\n      \"default\": 5,\n      \"range\": [\n        1,\n        20\n      ],\n      \"step\": 1,\n      \"label\": \"Max trades per run\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DIRECTION_FILTER\",\n      \"type\": \"enum\",\n      \"default\": \"any\",\n      \"options\": [\n        \"any\",\n        \"yes_only\",\n        \"no_only\"\n      ],\n      \"label\": \"Direction filter\"\n    }\n  ]\n}\n\nArchive v2.2.4: 5 files, 10740 bytes\n\nFiles: ai_divergence.py (22098b), clawhub.json (1546b), scripts/status.py (2251b), SKILL.md (4687b), _meta.json (143b)\n\nFile v2.2.4:SKILL.md\n\n---\nname: polymarket-ai-divergence\ndescription: 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.\nmetadata:\n  author: Simmer (@simmer_markets)\n  version: \"2.2.0\"\n  displayName: Polymarket AI Divergence\n  difficulty: intermediate\n---\n# Polymarket AI Divergence Trader\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade the edge.\n\n> **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.\n\n## What It Does\n\n1. **Scans** all active markets for AI vs market price divergence\n2. **Filters** to markets with edge above threshold (default 2%) and zero fees\n3. **Checks** safeguards (flip-flop detection, existing positions)\n4. **Sizes** using Kelly criterion, capped conservatively\n5. **Executes** trades on the mispriced side (YES when AI is bullish, NO when bearish)\n\n## Quick Commands\n\n```bash\n# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10\n```\n\n## Configuration\n\n| Key | Env Var | Default | Description |\n|-----|---------|---------|-------------|\n| `min_divergence` | `SIMMER_DIVERGENCE_MIN` | 5.0 | Min divergence % for scanner display |\n| `min_edge` | `SIMMER_DIVERGENCE_MIN_EDGE` | 0.02 | Min divergence to trade (2%) |\n| `max_bet_usd` | `SIMMER_DIVERGENCE_MAX_BET` | 5.0 | Max bet per trade |\n| `max_trades_per_run` | `SIMMER_DIVERGENCE_MAX_TRADES` | 3 | Max trades per cycle |\n| `kelly_cap` | `SIMMER_DIVERGENCE_KELLY_CAP` | 0.25 | Kelly fraction cap |\n| `daily_budget` | `SIMMER_DIVERGENCE_DAILY_BUDGET` | 25.0 | Daily spend limit |\n| `default_direction` | `SIMMER_DIVERGENCE_DIRECTION` | (both) | Filter: \"bullish\" or \"bearish\" |\n\nUpdate via CLI: `python ai_divergence.py --set max_bet_usd=10`\n\n## How It Works\n\n### Divergence Signal\n\nEach imported market has two prices:\n- **AI consensus** (`current_probability`) — Simmer's AI consensus price, derived from multi-model ensemble forecasting\n- **External price** (`external_price_yes`) — Real market price on Polymarket/Kalshi\n\n`divergence = AI consensus - external price`\n\nWhen divergence > 0: AI thinks the market is underpriced → buy YES\nWhen divergence < 0: AI thinks the market is overpriced → buy NO\n\n### Kelly Sizing\n\nPosition size uses the Kelly criterion:\n```\nkelly_fraction = edge / (1 - price)\nposition_size = kelly_fraction * max_bet_usd\n```\nCapped at `kelly_cap` (default 25%) to limit risk.\n\n### Fee Filtering\n\n75% 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.\n\n### Safeguards\n\n- **Fee check**: Skips markets with any taker fee\n- **Flip-flop detection**: Uses SDK's context API to detect contradictory trades\n- **Position check**: Skips markets where you already hold a position\n- **Daily budget**: Stops trading when daily spend limit is reached\n- **Kelly sizing**: Conservative sizing prevents over-betting\n\n## API Endpoints Used\n\n- `GET /api/sdk/markets/opportunities` — Divergence-ranked market list\n- `GET /api/sdk/context/{market_id}` — Fee rate and safeguards per market\n- `POST /api/sdk/trade` — Trade execution (via SDK client)\n- `GET /api/sdk/positions` — Current portfolio positions\n\n## Troubleshooting\n\n**\"No markets above min edge threshold\"**\n→ All divergences are below the `min_edge` setting. Lower it with `--set min_edge=0.01` or wait for larger divergences.\n\n**\"Daily budget exhausted\"**\n→ The skill has hit its daily spend limit. Adjust with `--set daily_budget=50`.\n\n**All markets skipped for fees**\n→ Only zero-fee markets are traded. If all available divergence opportunities have fees, no trades execute. This is by design.\n\n**\"context fetch failed\"**\n→ The SDK context endpoint is rate-limited (18 req/min). If running frequently, reduce `max_trades_per_run`.\n\nFile v2.2.4:_meta.json\n\n{\n  \"ownerId\": \"kn7axnp7bzqsf5fkx0z8px7han7zyq1x\",\n  \"slug\": \"polymarket-ai-divergence\",\n  \"version\": \"2.2.4\",\n  \"publishedAt\": 1775184416436\n}\n\nFile v2.2.4:clawhub.json\n\n{\n  \"emoji\": \"\\ud83d\\udd2e\",\n  \"requires\": {\n    \"env\": [\n      \"SIMMER_API_KEY\"\n    ],\n    \"pip\": [\n      \"simmer-sdk\"\n    ]\n  },\n  \"cron\": null,\n  \"autostart\": false,\n  \"automaton\": {\n    \"managed\": true,\n    \"entrypoint\": \"ai_divergence.py\"\n  },\n  \"tunables\": [\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MIN_EDGE\",\n      \"type\": \"number\",\n      \"default\": 0.05,\n      \"range\": [\n        0.01,\n        0.3\n      ],\n      \"step\": 0.01,\n      \"label\": \"Minimum edge threshold\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_BET_USD\",\n      \"type\": \"number\",\n      \"default\": 50,\n      \"range\": [\n        1,\n        200\n      ],\n      \"step\": 5,\n      \"label\": \"Max bet per trade\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_KELLY_CAP\",\n      \"type\": \"number\",\n      \"default\": 0.25,\n      \"range\": [\n        0.01,\n        1.0\n      ],\n      \"step\": 0.01,\n      \"label\": \"Kelly fraction cap\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DAILY_BUDGET_USD\",\n      \"type\": \"number\",\n      \"default\": 100,\n      \"range\": [\n        10,\n        500\n      ],\n      \"step\": 10,\n      \"label\": \"Daily budget\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_TRADES_PER_RUN\",\n      \"type\": \"number\",\n      \"default\": 5,\n      \"range\": [\n        1,\n        20\n      ],\n      \"step\": 1,\n      \"label\": \"Max trades per run\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DIRECTION_FILTER\",\n      \"type\": \"enum\",\n      \"default\": \"any\",\n      \"options\": [\n        \"any\",\n        \"yes_only\",\n        \"no_only\"\n      ],\n      \"label\": \"Direction filter\"\n    }\n  ]\n}\n\nArchive v2.2.3: 5 files, 10601 bytes\n\nFiles: ai_divergence.py (21754b), clawhub.json (1546b), scripts/status.py (2251b), SKILL.md (4687b), _meta.json (143b)\n\nFile v2.2.3:SKILL.md\n\n---\nname: polymarket-ai-divergence\ndescription: 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.\nmetadata:\n  author: Simmer (@simmer_markets)\n  version: \"2.2.0\"\n  displayName: Polymarket AI Divergence\n  difficulty: intermediate\n---\n# Polymarket AI Divergence Trader\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade the edge.\n\n> **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.\n\n## What It Does\n\n1. **Scans** all active markets for AI vs market price divergence\n2. **Filters** to markets with edge above threshold (default 2%) and zero fees\n3. **Checks** safeguards (flip-flop detection, existing positions)\n4. **Sizes** using Kelly criterion, capped conservatively\n5. **Executes** trades on the mispriced side (YES when AI is bullish, NO when bearish)\n\n## Quick Commands\n\n```bash\n# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10\n```\n\n## Configuration\n\n| Key | Env Var | Default | Description |\n|-----|---------|---------|-------------|\n| `min_divergence` | `SIMMER_DIVERGENCE_MIN` | 5.0 | Min divergence % for scanner display |\n| `min_edge` | `SIMMER_DIVERGENCE_MIN_EDGE` | 0.02 | Min divergence to trade (2%) |\n| `max_bet_usd` | `SIMMER_DIVERGENCE_MAX_BET` | 5.0 | Max bet per trade |\n| `max_trades_per_run` | `SIMMER_DIVERGENCE_MAX_TRADES` | 3 | Max trades per cycle |\n| `kelly_cap` | `SIMMER_DIVERGENCE_KELLY_CAP` | 0.25 | Kelly fraction cap |\n| `daily_budget` | `SIMMER_DIVERGENCE_DAILY_BUDGET` | 25.0 | Daily spend limit |\n| `default_direction` | `SIMMER_DIVERGENCE_DIRECTION` | (both) | Filter: \"bullish\" or \"bearish\" |\n\nUpdate via CLI: `python ai_divergence.py --set max_bet_usd=10`\n\n## How It Works\n\n### Divergence Signal\n\nEach imported market has two prices:\n- **AI consensus** (`current_probability`) — Simmer's AI consensus price, derived from multi-model ensemble forecasting\n- **External price** (`external_price_yes`) — Real market price on Polymarket/Kalshi\n\n`divergence = AI consensus - external price`\n\nWhen divergence > 0: AI thinks the market is underpriced → buy YES\nWhen divergence < 0: AI thinks the market is overpriced → buy NO\n\n### Kelly Sizing\n\nPosition size uses the Kelly criterion:\n```\nkelly_fraction = edge / (1 - price)\nposition_size = kelly_fraction * max_bet_usd\n```\nCapped at `kelly_cap` (default 25%) to limit risk.\n\n### Fee Filtering\n\n75% 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.\n\n### Safeguards\n\n- **Fee check**: Skips markets with any taker fee\n- **Flip-flop detection**: Uses SDK's context API to detect contradictory trades\n- **Position check**: Skips markets where you already hold a position\n- **Daily budget**: Stops trading when daily spend limit is reached\n- **Kelly sizing**: Conservative sizing prevents over-betting\n\n## API Endpoints Used\n\n- `GET /api/sdk/markets/opportunities` — Divergence-ranked market list\n- `GET /api/sdk/context/{market_id}` — Fee rate and safeguards per market\n- `POST /api/sdk/trade` — Trade execution (via SDK client)\n- `GET /api/sdk/positions` — Current portfolio positions\n\n## Troubleshooting\n\n**\"No markets above min edge threshold\"**\n→ All divergences are below the `min_edge` setting. Lower it with `--set min_edge=0.01` or wait for larger divergences.\n\n**\"Daily budget exhausted\"**\n→ The skill has hit its daily spend limit. Adjust with `--set daily_budget=50`.\n\n**All markets skipped for fees**\n→ Only zero-fee markets are traded. If all available divergence opportunities have fees, no trades execute. This is by design.\n\n**\"context fetch failed\"**\n→ The SDK context endpoint is rate-limited (18 req/min). If running frequently, reduce `max_trades_per_run`.\n\nFile v2.2.3:_meta.json\n\n{\n  \"ownerId\": \"kn7axnp7bzqsf5fkx0z8px7han7zyq1x\",\n  \"slug\": \"polymarket-ai-divergence\",\n  \"version\": \"2.2.3\",\n  \"publishedAt\": 1774767830636\n}\n\nFile v2.2.3:clawhub.json\n\n{\n  \"emoji\": \"\\ud83d\\udd2e\",\n  \"requires\": {\n    \"env\": [\n      \"SIMMER_API_KEY\"\n    ],\n    \"pip\": [\n      \"simmer-sdk\"\n    ]\n  },\n  \"cron\": null,\n  \"autostart\": false,\n  \"automaton\": {\n    \"managed\": true,\n    \"entrypoint\": \"ai_divergence.py\"\n  },\n  \"tunables\": [\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MIN_EDGE\",\n      \"type\": \"number\",\n      \"default\": 0.05,\n      \"range\": [\n        0.01,\n        0.3\n      ],\n      \"step\": 0.01,\n      \"label\": \"Minimum edge threshold\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_BET_USD\",\n      \"type\": \"number\",\n      \"default\": 50,\n      \"range\": [\n        1,\n        200\n      ],\n      \"step\": 5,\n      \"label\": \"Max bet per trade\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_KELLY_CAP\",\n      \"type\": \"number\",\n      \"default\": 0.25,\n      \"range\": [\n        0.01,\n        1.0\n      ],\n      \"step\": 0.01,\n      \"label\": \"Kelly fraction cap\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DAILY_BUDGET_USD\",\n      \"type\": \"number\",\n      \"default\": 100,\n      \"range\": [\n        10,\n        500\n      ],\n      \"step\": 10,\n      \"label\": \"Daily budget\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_TRADES_PER_RUN\",\n      \"type\": \"number\",\n      \"default\": 5,\n      \"range\": [\n        1,\n        20\n      ],\n      \"step\": 1,\n      \"label\": \"Max trades per run\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DIRECTION_FILTER\",\n      \"type\": \"enum\",\n      \"default\": \"any\",\n      \"options\": [\n        \"any\",\n        \"yes_only\",\n        \"no_only\"\n      ],\n      \"label\": \"Direction filter\"\n    }\n  ]\n}\n\nArchive v2.2.2: 5 files, 10572 bytes\n\nFiles: ai_divergence.py (21693b), clawhub.json (1546b), scripts/status.py (2251b), SKILL.md (4687b), _meta.json (143b)\n\nFile v2.2.2:SKILL.md\n\n---\nname: polymarket-ai-divergence\ndescription: 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.\nmetadata:\n  author: Simmer (@simmer_markets)\n  version: \"2.2.0\"\n  displayName: Polymarket AI Divergence\n  difficulty: intermediate\n---\n# Polymarket AI Divergence Trader\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade the edge.\n\n> **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.\n\n## What It Does\n\n1. **Scans** all active markets for AI vs market price divergence\n2. **Filters** to markets with edge above threshold (default 2%) and zero fees\n3. **Checks** safeguards (flip-flop detection, existing positions)\n4. **Sizes** using Kelly criterion, capped conservatively\n5. **Executes** trades on the mispriced side (YES when AI is bullish, NO when bearish)\n\n## Quick Commands\n\n```bash\n# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10\n```\n\n## Configuration\n\n| Key | Env Var | Default | Description |\n|-----|---------|---------|-------------|\n| `min_divergence` | `SIMMER_DIVERGENCE_MIN` | 5.0 | Min divergence % for scanner display |\n| `min_edge` | `SIMMER_DIVERGENCE_MIN_EDGE` | 0.02 | Min divergence to trade (2%) |\n| `max_bet_usd` | `SIMMER_DIVERGENCE_MAX_BET` | 5.0 | Max bet per trade |\n| `max_trades_per_run` | `SIMMER_DIVERGENCE_MAX_TRADES` | 3 | Max trades per cycle |\n| `kelly_cap` | `SIMMER_DIVERGENCE_KELLY_CAP` | 0.25 | Kelly fraction cap |\n| `daily_budget` | `SIMMER_DIVERGENCE_DAILY_BUDGET` | 25.0 | Daily spend limit |\n| `default_direction` | `SIMMER_DIVERGENCE_DIRECTION` | (both) | Filter: \"bullish\" or \"bearish\" |\n\nUpdate via CLI: `python ai_divergence.py --set max_bet_usd=10`\n\n## How It Works\n\n### Divergence Signal\n\nEach imported market has two prices:\n- **AI consensus** (`current_probability`) — Simmer's AI consensus price, derived from multi-model ensemble forecasting\n- **External price** (`external_price_yes`) — Real market price on Polymarket/Kalshi\n\n`divergence = AI consensus - external price`\n\nWhen divergence > 0: AI thinks the market is underpriced → buy YES\nWhen divergence < 0: AI thinks the market is overpriced → buy NO\n\n### Kelly Sizing\n\nPosition size uses the Kelly criterion:\n```\nkelly_fraction = edge / (1 - price)\nposition_size = kelly_fraction * max_bet_usd\n```\nCapped at `kelly_cap` (default 25%) to limit risk.\n\n### Fee Filtering\n\n75% 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.\n\n### Safeguards\n\n- **Fee check**: Skips markets with any taker fee\n- **Flip-flop detection**: Uses SDK's context API to detect contradictory trades\n- **Position check**: Skips markets where you already hold a position\n- **Daily budget**: Stops trading when daily spend limit is reached\n- **Kelly sizing**: Conservative sizing prevents over-betting\n\n## API Endpoints Used\n\n- `GET /api/sdk/markets/opportunities` — Divergence-ranked market list\n- `GET /api/sdk/context/{market_id}` — Fee rate and safeguards per market\n- `POST /api/sdk/trade` — Trade execution (via SDK client)\n- `GET /api/sdk/positions` — Current portfolio positions\n\n## Troubleshooting\n\n**\"No markets above min edge threshold\"**\n→ All divergences are below the `min_edge` setting. Lower it with `--set min_edge=0.01` or wait for larger divergences.\n\n**\"Daily budget exhausted\"**\n→ The skill has hit its daily spend limit. Adjust with `--set daily_budget=50`.\n\n**All markets skipped for fees**\n→ Only zero-fee markets are traded. If all available divergence opportunities have fees, no trades execute. This is by design.\n\n**\"context fetch failed\"**\n→ The SDK context endpoint is rate-limited (18 req/min). If running frequently, reduce `max_trades_per_run`.\n\nFile v2.2.2:_meta.json\n\n{\n  \"ownerId\": \"kn7axnp7bzqsf5fkx0z8px7han7zyq1x\",\n  \"slug\": \"polymarket-ai-divergence\",\n  \"version\": \"2.2.2\",\n  \"publishedAt\": 1773740451520\n}\n\nFile v2.2.2:clawhub.json\n\n{\n  \"emoji\": \"\\ud83d\\udd2e\",\n  \"requires\": {\n    \"env\": [\n      \"SIMMER_API_KEY\"\n    ],\n    \"pip\": [\n      \"simmer-sdk\"\n    ]\n  },\n  \"cron\": null,\n  \"autostart\": false,\n  \"automaton\": {\n    \"managed\": true,\n    \"entrypoint\": \"ai_divergence.py\"\n  },\n  \"tunables\": [\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MIN_EDGE\",\n      \"type\": \"number\",\n      \"default\": 0.05,\n      \"range\": [\n        0.01,\n        0.3\n      ],\n      \"step\": 0.01,\n      \"label\": \"Minimum edge threshold\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_BET_USD\",\n      \"type\": \"number\",\n      \"default\": 50,\n      \"range\": [\n        1,\n        200\n      ],\n      \"step\": 5,\n      \"label\": \"Max bet per trade\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_KELLY_CAP\",\n      \"type\": \"number\",\n      \"default\": 0.25,\n      \"range\": [\n        0.01,\n        1.0\n      ],\n      \"step\": 0.01,\n      \"label\": \"Kelly fraction cap\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DAILY_BUDGET_USD\",\n      \"type\": \"number\",\n      \"default\": 100,\n      \"range\": [\n        10,\n        500\n      ],\n      \"step\": 10,\n      \"label\": \"Daily budget\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_TRADES_PER_RUN\",\n      \"type\": \"number\",\n      \"default\": 5,\n      \"range\": [\n        1,\n        20\n      ],\n      \"step\": 1,\n      \"label\": \"Max trades per run\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DIRECTION_FILTER\",\n      \"type\": \"enum\",\n      \"default\": \"any\",\n      \"options\": [\n        \"any\",\n        \"yes_only\",\n        \"no_only\"\n      ],\n      \"label\": \"Direction filter\"\n    }\n  ]\n}\n\nArchive v2.2.1: 5 files, 10456 bytes\n\nFiles: ai_divergence.py (21216b), clawhub.json (1546b), scripts/status.py (2251b), SKILL.md (4687b), _meta.json (143b)\n\nFile v2.2.1:SKILL.md\n\n---\nname: polymarket-ai-divergence\ndescription: 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.\nmetadata:\n  author: Simmer (@simmer_markets)\n  version: \"2.2.0\"\n  displayName: Polymarket AI Divergence\n  difficulty: intermediate\n---\n# Polymarket AI Divergence Trader\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade the edge.\n\n> **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.\n\n## What It Does\n\n1. **Scans** all active markets for AI vs market price divergence\n2. **Filters** to markets with edge above threshold (default 2%) and zero fees\n3. **Checks** safeguards (flip-flop detection, existing positions)\n4. **Sizes** using Kelly criterion, capped conservatively\n5. **Executes** trades on the mispriced side (YES when AI is bullish, NO when bearish)\n\n## Quick Commands\n\n```bash\n# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10\n```\n\n## Configuration\n\n| Key | Env Var | Default | Description |\n|-----|---------|---------|-------------|\n| `min_divergence` | `SIMMER_DIVERGENCE_MIN` | 5.0 | Min divergence % for scanner display |\n| `min_edge` | `SIMMER_DIVERGENCE_MIN_EDGE` | 0.02 | Min divergence to trade (2%) |\n| `max_bet_usd` | `SIMMER_DIVERGENCE_MAX_BET` | 5.0 | Max bet per trade |\n| `max_trades_per_run` | `SIMMER_DIVERGENCE_MAX_TRADES` | 3 | Max trades per cycle |\n| `kelly_cap` | `SIMMER_DIVERGENCE_KELLY_CAP` | 0.25 | Kelly fraction cap |\n| `daily_budget` | `SIMMER_DIVERGENCE_DAILY_BUDGET` | 25.0 | Daily spend limit |\n| `default_direction` | `SIMMER_DIVERGENCE_DIRECTION` | (both) | Filter: \"bullish\" or \"bearish\" |\n\nUpdate via CLI: `python ai_divergence.py --set max_bet_usd=10`\n\n## How It Works\n\n### Divergence Signal\n\nEach imported market has two prices:\n- **AI consensus** (`current_probability`) — Simmer's AI consensus price, derived from multi-model ensemble forecasting\n- **External price** (`external_price_yes`) — Real market price on Polymarket/Kalshi\n\n`divergence = AI consensus - external price`\n\nWhen divergence > 0: AI thinks the market is underpriced → buy YES\nWhen divergence < 0: AI thinks the market is overpriced → buy NO\n\n### Kelly Sizing\n\nPosition size uses the Kelly criterion:\n```\nkelly_fraction = edge / (1 - price)\nposition_size = kelly_fraction * max_bet_usd\n```\nCapped at `kelly_cap` (default 25%) to limit risk.\n\n### Fee Filtering\n\n75% 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.\n\n### Safeguards\n\n- **Fee check**: Skips markets with any taker fee\n- **Flip-flop detection**: Uses SDK's context API to detect contradictory trades\n- **Position check**: Skips markets where you already hold a position\n- **Daily budget**: Stops trading when daily spend limit is reached\n- **Kelly sizing**: Conservative sizing prevents over-betting\n\n## API Endpoints Used\n\n- `GET /api/sdk/markets/opportunities` — Divergence-ranked market list\n- `GET /api/sdk/context/{market_id}` — Fee rate and safeguards per market\n- `POST /api/sdk/trade` — Trade execution (via SDK client)\n- `GET /api/sdk/positions` — Current portfolio positions\n\n## Troubleshooting\n\n**\"No markets above min edge threshold\"**\n→ All divergences are below the `min_edge` setting. Lower it with `--set min_edge=0.01` or wait for larger divergences.\n\n**\"Daily budget exhausted\"**\n→ The skill has hit its daily spend limit. Adjust with `--set daily_budget=50`.\n\n**All markets skipped for fees**\n→ Only zero-fee markets are traded. If all available divergence opportunities have fees, no trades execute. This is by design.\n\n**\"context fetch failed\"**\n→ The SDK context endpoint is rate-limited (18 req/min). If running frequently, reduce `max_trades_per_run`.\n\nFile v2.2.1:_meta.json\n\n{\n  \"ownerId\": \"kn7axnp7bzqsf5fkx0z8px7han7zyq1x\",\n  \"slug\": \"polymarket-ai-divergence\",\n  \"version\": \"2.2.1\",\n  \"publishedAt\": 1773660717299\n}\n\nFile v2.2.1:clawhub.json\n\n{\n  \"emoji\": \"\\ud83d\\udd2e\",\n  \"requires\": {\n    \"env\": [\n      \"SIMMER_API_KEY\"\n    ],\n    \"pip\": [\n      \"simmer-sdk\"\n    ]\n  },\n  \"cron\": null,\n  \"autostart\": false,\n  \"automaton\": {\n    \"managed\": true,\n    \"entrypoint\": \"ai_divergence.py\"\n  },\n  \"tunables\": [\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MIN_EDGE\",\n      \"type\": \"number\",\n      \"default\": 0.05,\n      \"range\": [\n        0.01,\n        0.3\n      ],\n      \"step\": 0.01,\n      \"label\": \"Minimum edge threshold\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_BET_USD\",\n      \"type\": \"number\",\n      \"default\": 50,\n      \"range\": [\n        1,\n        200\n      ],\n      \"step\": 5,\n      \"label\": \"Max bet per trade\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_KELLY_CAP\",\n      \"type\": \"number\",\n      \"default\": 0.25,\n      \"range\": [\n        0.01,\n        1.0\n      ],\n      \"step\": 0.01,\n      \"label\": \"Kelly fraction cap\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DAILY_BUDGET_USD\",\n      \"type\": \"number\",\n      \"default\": 100,\n      \"range\": [\n        10,\n        500\n      ],\n      \"step\": 10,\n      \"label\": \"Daily budget\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_TRADES_PER_RUN\",\n      \"type\": \"number\",\n      \"default\": 5,\n      \"range\": [\n        1,\n        20\n      ],\n      \"step\": 1,\n      \"label\": \"Max trades per run\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DIRECTION_FILTER\",\n      \"type\": \"enum\",\n      \"default\": \"any\",\n      \"options\": [\n        \"any\",\n        \"yes_only\",\n        \"no_only\"\n      ],\n      \"label\": \"Direction filter\"\n    }\n  ]\n}","readmeExcerpt":"Skill: Polymarket Ai Divergence Owner: simmer Summary: 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... Tags: latest:2.3.0 Version history: v2.3.0 | 2026-04-25T09:20:10.731Z | user Migrate to Polymarket Gamma keyset pagination (deprecation deadline May 1, 2026). GammaClient.get_markets and get_events now re","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"pip install simmer-sdk"},{"language":"bash","snippet":"# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10"},{"language":"text","snippet":"kelly_fraction = edge / (1 - price)\nposition_size = kelly_fraction * max_bet_usd"},{"language":"bash","snippet":"pip install simmer-sdk"},{"language":"bash","snippet":"# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10"},{"language":"text","snippet":"kelly_fraction = edge / (1 - price)\nposition_size = kelly_fraction * max_bet_usd"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: polymarket-ai-divergence\ndescription: 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.\nmetadata:\n  author: Simmer (@simmer_markets)\n  version: \"2.3.0\"\n  displayName: Polymarket AI Divergence\n  difficulty: intermediate\n---\n# Polymarket AI Divergence Trader\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade the edge.\n\n> **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.\n\n## What It Does\n\n1. **Scans** all active markets for AI vs market price divergence\n2. **Filters** to markets with edge above threshold (default 2%) and zero fees\n3. **Checks** safeguards (flip-flop detection, existing positions)\n4. **Sizes** using Kelly criterion, capped conservatively\n5. **Executes** trades on the mispriced side (YES when AI is bullish, NO when bearish)\n\n## Setup Flow\n\nWhen user asks to install or configure this skill:\n\n1. **Install the Simmer SDK**\n   ```bash\n   pip install simmer-sdk\n   ```\n\n2. **Ask for Simmer API key**\n   - They can get it from simmer.markets/dashboard → SDK tab\n   - Store in environment as `SIMMER_API_KEY`\n\n3. **Ask for wallet private key** (required for live trading)\n   - This is the private key for their Polymarket wallet (the wallet that holds USDC)\n   - Store in environment as `WALLET_PRIVATE_KEY`\n   - The SDK uses this to sign orders client-side automatically — no manual signing needed\n   - Not needed for $SIM paper trading on the Simmer venue\n\n## Quick Commands\n\n```bash\n# Scan only (dry run, no trades)\npython ai_divergence.py\n\n# Scan + execute trades\npython ai_divergence.py --live\n\n# Only show bullish divergences\npython ai_divergence.py --bullish\n\n# Only >15% divergence\npython ai_divergence.py --min 15\n\n# JSON output\npython ai_divergence.py --json\n\n# Cron mode (quiet, trades only)\npython ai_divergence.py --live --quiet\n\n# Show config\npython ai_divergence.py --config\n\n# Update config\npython ai_divergence.py --set max_bet_usd=10\n```\n\n## Configuration\n\n| Key | Env Var | Default | Description |\n|-----|---------|---------|-------------|\n| `min_divergence` | `SIMMER_DIVERGENCE_MIN` | 5.0 | Min divergence % for scanner display |\n| `min_edge` | `SIMMER_DIVERGENCE_MIN_EDGE` | 0.02 | Min divergence to trade (2%) |\n| `max_bet_usd` | `SIMMER_DIVERGENCE_MAX_BET` | 5.0 | Max bet per trade |\n| `max_trades_per_run` | `SIMMER_DIVERGENCE_MAX_TRADES` | 3 | Max trades per cycle |\n| `kelly_cap` | `SIMMER_DIVERGENCE_KELLY_CAP` | 0.25 | Kelly fraction cap |\n| `daily_budget` | `SIMMER_DIVERGENCE"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7axnp7bzqsf5fkx0z8px7han7zyq1x\",\n  \"slug\": \"polymarket-ai-divergence\",\n  \"version\": \"2.3.0\",\n  \"publishedAt\": 1777108810731\n}"},{"path":"skill-card.md","content":"## Description:\n\nFind markets where Simmer's AI consensus diverges from the real market price, then trade on the mispriced side using Kelly sizing.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[simmer](https://clawhub.ai/user/simmer)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and trading agents use this skill to scan Polymarket and Kalshi-related market opportunities where Simmer AI consensus differs from external market prices, review divergence signals, and optionally execute position-sized trades.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Live mode can place real-money trades and the artifact may redeem positions automatically when run.\n\nMitigation: Review settings before execution, run dry scans first, and use a dedicated low-balance wallet with conservative max bet, daily budget, and trade count limits.\n\nRisk: WALLET_PRIVATE_KEY is highly sensitive when external-wallet trading is enabled.\n\nMitigation: Store private keys only in a trusted secret store or environment, never commit them, and rotate funds away from any exposed wallet.\n\nRisk: The current artifact should not be relied on to trade only zero-fee markets.\n\nMitigation: Verify fee checks and configured endpoints before live trading, and independently confirm market fees when real funds are at risk.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/simmer/skills/polymarket-ai-divergence)\n- [Simmer SDK API](https://api.simmer.markets)\n- [Polymarket Gamma API](https://gamma-api.polymarket.com)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, configuration, guidance]\n\n**Output Format:** [CLI text tables, Markdown instructions, and optional JSON output]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May place live trades when run with --live or when configured for a paper trading venue; requires SIMMER_API_KEY and may use WALLET_PRIVATE_KEY for external-wallet trading.]\n\n## Skill Version(s):\n\n2.3.0 (source: frontmatter, server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."},{"path":"clawhub.json","content":"{\n  \"emoji\": \"\\ud83d\\udd2e\",\n  \"primaryEnv\": \"SIMMER_API_KEY\",\n  \"requires\": {\n    \"env\": [\n      \"SIMMER_API_KEY\"\n    ],\n    \"pip\": [\n      \"simmer-sdk>=0.11.1\"\n    ]\n  },\n  \"envVars\": [\n    {\n      \"name\": \"SIMMER_API_KEY\",\n      \"required\": true,\n      \"description\": \"Your Simmer SDK API key \\u2014 get from simmer.markets/dashboard\"\n    },\n    {\n      \"name\": \"WALLET_PRIVATE_KEY\",\n      \"required\": false,\n      \"description\": \"Only needed for external-wallet self-custody trading. Not required when using managed wallets.\"\n    }\n  ],\n  \"cron\": null,\n  \"autostart\": false,\n  \"automaton\": {\n    \"managed\": true,\n    \"entrypoint\": \"ai_divergence.py\"\n  },\n  \"tunables\": [\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MIN_EDGE\",\n      \"type\": \"number\",\n      \"default\": 0.05,\n      \"range\": [\n        0.01,\n        0.3\n      ],\n      \"step\": 0.01,\n      \"label\": \"Minimum edge threshold\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_BET_USD\",\n      \"type\": \"number\",\n      \"default\": 50,\n      \"range\": [\n        1,\n        200\n      ],\n      \"step\": 5,\n      \"label\": \"Max bet per trade\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_KELLY_CAP\",\n      \"type\": \"number\",\n      \"default\": 0.25,\n      \"range\": [\n        0.01,\n        1.0\n      ],\n      \"step\": 0.01,\n      \"label\": \"Kelly fraction cap\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DAILY_BUDGET_USD\",\n      \"type\": \"number\",\n      \"default\": 100,\n      \"range\": [\n        10,\n        500\n      ],\n      \"step\": 10,\n      \"label\": \"Daily budget\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_MAX_TRADES_PER_RUN\",\n      \"type\": \"number\",\n      \"default\": 5,\n      \"range\": [\n        1,\n        20\n      ],\n      \"step\": 1,\n      \"label\": \"Max trades per run\"\n    },\n    {\n      \"env\": \"SIMMER_DIVERGENCE_DIRECTION_FILTER\",\n      \"type\": \"enum\",\n      \"default\": \"any\",\n      \"options\": [\n        \"any\",\n        \"yes_only\",\n        \"no_only\"\n      ],\n      \"label\": \"Direction filter\"\n    }\n  ]\n}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1380,"uniquenessScore":44,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T09:10:07.513Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T09:10:07.513Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T18:53:05.366Z","emptyReason":null},"items":[{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-10T18:48:31.762Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}