Integrate Polymarket API using the OpenClaw "skills" system to scan for market imbalances, execute logical arbitrage, and automate betting on prediction markets. This guide uses the **PolyClaw** skill as a foundation for combining Python scripts with LLM analysis.
This integration involves real financial risk. Start with small amounts and ensure compliance with local regulations. Never share your private keys.
By integrating the PolyClaw skill, OpenClaw can:
uv package manager.git clone https://github.com/openclaw/openclaw.git
cd openclaw
uv sync
Create a .env file with the following variables:
CHAINSTACK_NODE="https://polygon-mainnet.core.chainstack.com/YOUR_API_KEY"
POLYCLAW_PRIVATE_KEY="0xYOUR_PRIVATE_KEY"
OPENROUTER_API_KEY="sk-or-YOUR_KEY"
PolyClaw handles the specific logic for order signing and interaction with the CLOB (Central Limit Order Book) API.
git clone https://github.com/chainstacklabs/polyclaw
cd polyclaw
uv sync
Integrate the script into your OpenClaw skills directory and enable it via the TUI or chat interface.
# Search for specific market themes
uv run python scripts/polyclaw.py markets search "election"
# Scan for logical inconsistencies and price spreads
uv run python scripts/polyclaw.py hedge scan --query "election" --limit 10
# Buy shares in a specific market
uv run python scripts/polyclaw.py buy YES 50
uv run python scripts/polyclaw.py positions
This command displays your current P&L, side (YES/NO), and entry prices.