PolyClaw Pro
by @lmanchu
Trade on Polymarket via split + CLOB execution. Browse markets, track positions with P&L, discover hedges via LLM. Includes automation tools: live portfolio...
First, install dependencies (from skill directory):
cd {baseDir}
uv sync
First-Time Setup (Required for Trading)
Before your first trade, set Polymarket contract approvals (one-time, costs ~0.01 POL in gas):
uv run python scripts/polyclaw.py wallet approve
This submits 6 approval transactions to Polygon. You only need to do this once per wallet.
Browse Markets
# Trending markets by volume
uv run python scripts/polyclaw.py markets trendingSearch markets
uv run python scripts/polyclaw.py markets search "election"Market details (returns full JSON with all fields)
uv run python scripts/polyclaw.py market
Output options:
--full flag for full question text without truncation--json flag via scripts/markets.py --json trending for structured JSON outputWallet Management
# Check wallet status (address, balances)
uv run python scripts/polyclaw.py wallet statusSet contract approvals (one-time)
uv run python scripts/polyclaw.py wallet approve
The wallet is configured via the POLYCLAW_PRIVATE_KEY environment variable.
Trading
# Buy YES position for $50
uv run python scripts/polyclaw.py buy YES 50Buy NO position for $25
uv run python scripts/polyclaw.py buy NO 25
Positions
# List all positions with P&L
uv run python scripts/polyclaw.py positions
Hedge Discovery
Find covering portfolios - pairs of market positions that hedge each other via contrapositive logic.
# Scan trending markets for hedges
uv run python scripts/polyclaw.py hedge scanScan markets matching a query
uv run python scripts/polyclaw.py hedge scan --query "election"Analyze specific markets for hedging relationship
uv run python scripts/polyclaw.py hedge analyze
Output options:
--json flag for structured JSON output--min-coverage 0.90 to filter by minimum coverage (default 0.85)--tier 1 to filter by tier (1=best, default 2)Coverage tiers:
LLM model: Uses nvidia/nemotron-nano-9b-v2:free via OpenRouter. Model selection matters β some models find spurious correlations while others (like DeepSeek R1) have output format issues. Override with --model if needed.
"No wallet available"
Set thePOLYCLAW_PRIVATE_KEY environment variable:
export POLYCLAW_PRIVATE_KEY="0x..."
"Insufficient USDC.e"
Check balance withuv run python scripts/polyclaw.py wallet status. You need USDC.e (bridged USDC) on Polygon."CLOB order failed"
The CLOB sell may fail due to:Your split still succeeded - you have the tokens, just couldn't sell unwanted side.
"Approvals not set"
First trade requires contract approvals. Run:uv run python scripts/polyclaw.py wallet approve
clawhub install polyclaw-pro