blockrunai/blockrun-mcp/polymarket-trading
- community
Checking that the SKILL.md file is still in the repository.
Use when the user wants to actually PLACE, manage, or redeem bets on Polymarket (not just read odds — that's blockrun_markets). Covers setup (deposit wallet, funding, approvals), buy/sell with confirm gating, positions, redeeming winnings, geoblock handling, and the end-to-end demo flow.
Install
npx vskill@latest install blockrunai/blockrun-mcp/polymarket-tradingSKILL.md
Polymarket Trading (blockrun_polymarket)
Real-money trading on Polymarket's CLOB V2 (Polygon), signed locally by the user's BlockRun wallet key. Data discovery stays on `blockrun_markets` — this tool only trades.
Mental model
- Signer = the BlockRun wallet key (
~/.blockrun/.sessionby default; a
BLOCKRUN_WALLET_KEY env var or an existing agent wallet.json takes precedence). Never leaves the machine. setup prints the actual signer address — back up the key behind it, wherever it lives (key file or env-var value).
- Deposit wallet = a Polygon vault contract derived from that key
(POLY_1271). It holds the betting funds in pUSD and only honors the signer's EIP-712 signatures. Deploy/approve/redeem are gasless (relayer).
- Money separation: bets spend pUSD on Polygon; x402 API fees spend USDC on
Base. The budget ledger does NOT cover bets — confirm:true + caps do.
- Zero setup: no Polymarket account, no API keys, no gas token. On first
setup the MCP bootstraps a builder key from the user's OWN wallet, then derives + deploys the vault (all gasless). Geoblock is handled by default — CLOB traffic routes through BlockRun's Finland egress out of the box.
Golden rules for agents
- **Never pass
confirm:trueunless the user explicitly approved that exact
trade.** Call once WITHOUT confirm → show the dry-run preview → ask → re-call with confirm:true.
- Per-order cap
POLYMARKET_MAX_BET_USD(default $25) and optional session cap
are enforced server-side; don't try to split orders to sneak past them. The optional POLYMARKET_MAX_FUND_USD bounds a single fund call the same way. A withdraw preview marks any to_address that is not the user's own agent wallet as CUSTOM — show the user that line verbatim before confirming.
- On ANY error, read the message — it says exactly what to do next (fund,
approve, region, re-run setup). Don't retry blindly.
End-to-end flow
Order semantics
- Prices are probabilities 0–1, auto-rounded to the market's tick grid.
- A market-order preview states
worst fill ≤ X(buy) /≥ X(sell); the
order is signed at that bound, so quote it to the user as the price limit.
- Market buy =
amount_usd(dollars). Market sell =size(shares). - Limit orders:
price+size; default GTC;post_only:truefor maker-only. - FOK fails whole-or-nothing; FAK fills what it can. On "FOK not filled", offer
FAK or a limit at the shown book price.
Regions / geoblock
Order placement is IP-geoblocked (US/UK/EU + many regions). Handled by default — CLOB traffic routes through BlockRun's Finland egress, so setup reports ✅ Region: order placement permitted out of the box; you don't need to do anything. A user can override by pointing POLYMARKET_CLOB_HOST at their own relay (or at Polymarket directly, from a permitted region), optionally reached through their own proxy via POLYMARKET_CLOB_PROXY / HTTPS_PROXY (POLYMARKET_CLOB_PROXY wins if both are set). A proxy alone does NOT change the Polymarket-facing egress — CLOB traffic still exits from BlockRun's Finland relay unless POLYMARKET_CLOB_HOST is also repointed. Respecting Polymarket's ToS for the user's jurisdiction is the user's responsibility — never suggest evading it.
Troubleshooting
- "No deposit wallet configured" → run
action:"setup". - No manual creds are ever needed — the MCP bootstraps its builder key from the
user's own wallet on first setup. (Advanced: POLYMARKET_SIG_TYPE=0 = plain EOA mode; needs POL gas + pUSD in the EOA. The CLOB may reject plain-EOA makers on order placement — treat it as a diagnostic fallback, not a guaranteed trading mode.)
- Balance/allowance errors on a buy → the buy path auto-refreshes the CLOB's
balance cache and retries once; if it still fails, the vault genuinely lacks pUSD or approvals — fund it, then action:"setup" confirm:true.
- A neg-risk market buy (multi-outcome "winner" markets) fails though setup
shows ready → a deposit wallet created before the pUSD→NegRisk Adapter approval was added needs ONE more action:"setup" confirm:true to grant it (setup reads approvals on-chain every run, so it detects and signs the missing one).
- A redeem reverts → same self-heal: wallets set up before 2026-07 lack the
collateral-adapter approvals redeem now pulls tokens through — one action:"setup" confirm:true grants them.
- 403 → region issue; see setup's region line.
- "order signer address has to be the address of the API KEY" → auto-recovered
once (creds re-derived); if persistent, setup, then as a last resort POLYMARKET_SIG_TYPE=0 (upstream clob-client-v2 issue #65; see the EOA-mode caveat above).
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/polymarket-trading/SKILL.md
Popularity
- Repository stars
- 389
- Repository forks
- 38
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/blockrunai/blockrun-mcp/polymarket-trading)