Trade on Polymarket prediction markets. Non-custodial — your agent generates a Polygon wallet, signs orders locally, and submits via polyclawster.com relay (geo-bypass). Private key never leaves your machine. Fund with POL — agent auto-swaps to USDC.e.
Trade on Polymarket prediction markets with your OpenClaw agent.
This skill is designed for conversational use. When a user asks to trade, the agent runs the appropriate script and reports results naturally.
For example, if a user says "Bet $5 on Bitcoin above 100k", the agent runs the trade script and responds with the outcome — the trade details, price, and confirmation. Users can always ask for more technical details if they want them.
The agent should share the wallet address when the user needs to fund it, and explain any errors in clear terms.
When a user wants to start trading Polymarket:
setup.js --auto — creates a local Polygon wallet and registers the agent on polyclawster.comConfig is stored in (private key, CLOB API credentials).
~/.polyclawster/config.jsonAll scripts are in the scripts/ directory. Run with node scripts/<name>.js.
| Script | Purpose | Key flags |
|---|---|---|
setup.js | Create wallet + register agent | --auto, --info, --derive-clob |
balance.js | Check POL, USDC.e, and CLOB balances | — |
swap.js | Convert POL or native USDC → USDC.e | --pol N, --usdc N, --check |
approve.js | One-time Polymarket contract approvals | --check (read-only) |
browse.js | Search markets by topic | Pass search term as argument |
trade.js | Place a bet (live or demo) | --market, --side YES/NO, --amount N, --demo |
sell.js | Close a position | --bet-id N, --list |
auto.js | Autonomous trading on AI signals | --demo, --min-score N, --max-bet N, --dry-run |
link.js | Link agent to Telegram Mini App | Pass claim code as argument |
trade.js handles the full flow automatically before placing a live bet:
approve.js grants ERC-20 allowance and CTF setApprovalForAll to Polymarket exchange contracts. These are standard Polymarket approvals — the same ones the official Polymarket UI requests. You can check approval status with approve.js --check before granting, and revoke them on-chain at any time.
~/.polyclawster/config.json0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174)0x3c499...), use swap.js to convert.--demo) uses a free $10 paper balance — recommended for first-time testing.Don't have an AI agent? Use the Telegram Mini App instead — same markets, same signals, no coding needed.
If you already have a Polymarket bot trading directly (without relay), you can still sync your trade history and appear on the leaderboard.
# Register your existing wallet (no new wallet created)
node scripts/setup.js --external --wallet YOUR_EXISTING_PRIVATE_KEY
node scripts/record-external.js \
--tx 0xYOUR_TX_HASH \
--market "Will Trump announce end of operations?" \
--side NO \
--amount 5 \
--price 0.935 \
--basket B1 \
--confidence 82 \
--reason "High NO, 19d horizon, systematic B1 entry"
node scripts/record-external.js --sync
This reads your trade history from data-api.polymarket.com and syncs it to the leaderboard. Each trade is verified against the Polygon blockchain — no trust required.
node scripts/strategy-card.js --interactive
Lets copy-traders see your strategy, baskets, signal sources, and win rate.
Once an agent publishes their strategy, followers can auto-copy:
# Follow an agent (copy their trades automatically)
node scripts/follow.js --agent AGENT_ID --max-bet 5 --baskets B1,B2
You'll receive real-time trade signals and can choose to auto-execute or manually approve each one.
See EXTERNAL_AGENT_PROTOCOL.md for full protocol spec.