Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Autonomous Polymarket Trading Agent

BSecurity

Autonomous Polymarket prediction market trading agent. Scans markets, evaluates probabilities with LLM, sizes positions with Kelly criterion, and executes trades via CLOB API. Use when user wants to trade on Polymarket, set up automated prediction market trading, or build a trad…

19 stars
0 votes
0 copies
0 views
Added 9/19/2026
ai-agentspythongobashgitapisecuritydocumentation

Works with

cliapi

Security Analysis

B89/100
highCreates or modifies cron jobs for persistent execution
mediumInstalls packages at runtime which could introduce malicious dependencies

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add rondoflow/rondoflow --skill autonomous-polymarket-trading-agent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Autonomous Polymarket Trading Agent?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Autonomous Polymarket Trading Agent
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/rondoflow-autonomous-polymarket-trading-agent/badge)](https://www.skillsdirectory.com/skills/rondoflow-autonomous-polymarket-trading-agent)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: autonomous-polymarket-trading-agent
description: "Autonomous Polymarket prediction market trading agent. Scans markets, evaluates probabilities with LLM, sizes positions with Kelly criterion, and executes trades via CLOB API. Use when user wants to trade on Polymarket, set up automated prediction market trading, or build a trad…"
category: "Finance & Crypto"
author: community
version: "1.0.1"
icon: coins
---

# Polymarket Auto-Trader

Fully autonomous prediction market trading agent for Polymarket. Evaluates markets using LLM probability estimation, sizes positions with Kelly criterion, and executes trades via the Polymarket CLOB API from a non-US VPS.

## Prerequisites

- **Non-US VPS** — Polymarket blocks US IPs. Use DigitalOcean Amsterdam, Hetzner EU, etc.
- **Polygon wallet** with USDC.e (bridged USDC, NOT native USDC)
- **MATIC** for gas (~0.1 MATIC sufficient for hundreds of trades)
- **Anthropic API key** (uses Haiku at ~$0.001/evaluation)

## Setup

### 1. VPS Environment

SSH into your non-US VPS and run:

```bash
python3 {baseDir}/scripts/setup_vps.sh
```

Or manually:
```bash
apt update && apt install -y python3 python3-venv
python3 -m venv /opt/trader
/opt/trader/bin/pip install py-clob-client python-dotenv web3 requests
```

### 2. Configuration

Create `/opt/trader/app/.env`:
```
PRIVATE_KEY=<your-polygon-wallet-private-key>
LLM_API_KEY=<your-anthropic-api-key>
```

### 3. Blockchain Approvals

Before trading, approve USDC.e and CTF tokens for Polymarket contracts. Run:
```bash
python3 {baseDir}/scripts/approve_contracts.py
```

Required approvals (6 total):
- USDC.e → CTF Exchange, Neg Risk Exchange, Neg Risk Adapter
- CTF → CTF Exchange, Neg Risk Exchange, Neg Risk Adapter

### 4. Deploy Trading Script

```bash
cp {baseDir}/scripts/run_trade.py /opt/trader/app/
cp {baseDir}/scripts/pnl_tracker.py /opt/trader/app/
```

### 5. Cron Automation

```bash
crontab -e
# Add: */10 * * * * cd /opt/trader/app && /opt/trader/bin/python3 run_trade.py >> cron.log 2>&1
```

## How It Works

1. **Market Scan** — Fetches active markets from Gamma API, filters by liquidity and time horizon
2. **LLM Evaluation** — Asks Claude Haiku to estimate true probability for each market
3. **Edge Detection** — Compares LLM fair value vs market price (min 5% edge threshold)
4. **Kelly Sizing** — Half-Kelly criterion with 25% max position size cap
5. **Order Execution** — Places limit orders via CLOB API with GTC (good-till-cancelled)
6. **Dedup** — Tracks all trades in `trades.jsonl`, skips already-traded markets
7. **Budget Control** — Tracks LLM inference costs separately from trading capital

## Trading Parameters

Configurable in `run_trade.py`:
- `EDGE_THRESHOLD` — Minimum edge to trade (default: 0.05 = 5%)
- `MIN_SHARES` — Minimum order size (Polymarket requires ≥5 shares)
- Bankroll allocation: 80% usable, 25% max per trade, 30% cap per single position
- Market horizon: Prioritizes markets ending within 30 days

## Monitoring

Check P&L anytime:
```bash
python3 /opt/trader/app/pnl_tracker.py
```

Check recent activity:
```bash
tail -50 /opt/trader/app/cron.log
```

## Key Technical Details

- **Wallet type:** EOA (signature_type=0), NOT proxy wallet
- **Token:** USDC.e (`0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174`), not native USDC
- **Neg-risk markets** (elections, sports leagues) require USDC.e approval for Neg Risk Adapter (`0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296`)
- **US geoblock** — All API calls must originate from non-US IP. VPN insufficient; use actual non-US VPS.

## Cost

- LLM inference: ~$0.001 per market evaluation (Haiku)
- Typical cycle (40 evals): ~$0.04
- Gas: negligible on Polygon (~$0.001 per trade)

## ⚠️ Security Considerations

- **Use a DEDICATED wallet with minimal funds.** Never use your main wallet's private key. Create a fresh wallet and fund it only with what you're willing to risk.
- **PRIVATE_KEY is stored on disk** in `.env`. Harden your VPS: strict file permissions (`chmod 600 .env`), no shared access, firewall, SSH keys only.
- **MAX_UINT approvals** are standard in DeFi but grant broad spending rights. The approved contracts are official Polymarket contracts. Review addresses in `references/contract-addresses.md` before running.
- **Test with tiny amounts first** ($5-10) before scaling up.
- **Monitor actively** — check `cron.log` and run `pnl_tracker.py` regularly.
- **LLM_API_KEY billing** — each cycle costs ~$0.04 (Haiku). Set billing alerts on your Anthropic account.
- **This is autonomous trading software.** Bugs or market conditions can cause losses. Use at your own risk.

## References

- See `references/polymarket-api.md` for full CLOB API documentation
- See `references/contract-addresses.md` for all Polygon contract addresses

Attribution

rondoflowrondoflow
View sourceMore from rondoflow →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

693621 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →