PolyClaw is a trading-enabled Polymarket skill for OpenClaw that brings the full Polymarket trading stack into a single CLI. Rather than juggling browser tabs, manual approvals, and bespoke scripts, PolyClaw gives you a unified command interface to browse prediction markets, execute on-chain YES/NO trades via Polymarket’s split + CLOB V2 architecture, track open positions with live profit-and-loss, and surface hedging opportunities through LLM-powered logical-implication analysis — all on Polygon mainnet using pUSD as collateral.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/deniszidbaev-cmyk/polyclaw-cmyk/llms.txt
Use this file to discover all available pages before exploring further.
Key Features
Market Browsing
Browse trending markets by 24-hour volume, search by keyword, and inspect full market details including current prices and question text.
On-Chain Trading
Execute YES or NO trades via Polymarket’s split + CLOB V2 flow on Polygon mainnet. Split pUSD into YES + NO tokens, then sell the unwanted side through the order book to arrive at your desired position.
Position Tracking
View all open positions in a single table with entry price, current market price, and live P&L. Positions are persisted locally in
~/.openclaw/polyclaw/positions.json.Hedge Discovery
Scan markets for covering portfolios using LLM-powered contrapositive logic. Only logically necessary implications are accepted — spurious correlations are rejected. Results are ranked by coverage tier (T1 ≥ 95%, T2 90–95%, T3 85–90%).
Collateral Redemption
Claim pUSD collateral from resolved positions with
redeem list, redeem <position_id>, or redeem all to sweep every redeemable position in one command.OpenClaw Integration
Registered as an OpenClaw skill with a full
SKILL.md manifest. Invoke every command through natural-language prompts in the OpenClaw agent, or run the CLI standalone without OpenClaw at all.How It Works
PolyClaw is a Python CLI skill distributed via ClawHub and managed with uv. It wraps thepy-clob-client-v2 library for CLOB order placement, uses web3.py to interact with the Polymarket Conditional Token Framework (CTF) contracts directly, and calls the Polymarket Gamma API for market discovery.
Every trade follows the same two-step on-chain flow:
- Split — Deposit pUSD into the CTF contract, which mints equal amounts of YES and NO tokens.
- Sell unwanted — Sell the side you don’t want via the CLOB order book (V2), recovering partial cost. The result is a clean directional position at the effective market price.
Standalone vs. OpenClaw Mode
PolyClaw is designed as an OpenClaw skill but ships as a fully self-contained Python project. You can:- OpenClaw mode — Configure environment variables in
openclaw.jsonand drive every feature through natural-language agent prompts. - Standalone mode — Export environment variables directly (or use a
.envfile in the skill root) and calluv run python scripts/polyclaw.py <command>from your terminal.
Disclaimer
Get Started
Quickstart →
Install PolyClaw, configure your keys, set contract approvals, and execute your first Polymarket trade in under 10 minutes.