Agent skill

Polymarket Trading

by BlockRunAI in BlockRunAI/blockrun-mcp

Lets the agent place, manage and redeem real-money Polymarket bets through ClawRouter, with a dry-run preview and your confirmation before any order.

MITAuto-check passedBusiness, Finance & HR

Install Polymarket Trading

skills CLI
$ npx skills add BlockRunAI/blockrun-mcp --skill polymarket-trading -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install BlockRunAI/blockrun-mcp polymarket-trading --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/BlockRunAI/blockrun-mcp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/polymarket-trading .claude/skills/polymarket-trading && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
polymarket-trading
GitHub stars
391
Token cost
~1.8k tokens
SKILL.md length
668 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

Lets the agent place, manage and redeem real-money Polymarket bets through ClawRouter, with a dry-run preview and your confirmation before any order.

  • Works in 3 steps: **Never pass confirm:true unless the… → Per-order cap POLYMARKET_MAX_BET_USD… → On ANY error, read the message — it says…
  • Placing a buy or sell order on a Polymarket market
  • SKILL.md covers Mental model, Golden rules for agents, End-to-end flow and Order semantics, plus 2 more sections
  • Needs BLOCKRUN_WALLET_KEY

What it does

The blockrun_polymarket tool trades on Polymarket's CLOB V2 on Polygon. Orders are signed locally with your ClawRouter wallet key, and bets are paid from a deposit wallet derived from that key and held in pUSD. Finding markets and reading odds stays with the separate blockrun_predexon_* data tools; this skill is only about trading. No Polymarket account or API keys are needed, because setup bootstraps everything from your own wallet.

The agent is told never to pass confirm:true unless you approved that exact trade: it calls once without it, shows the dry-run preview, asks you, and only then repeats the call with confirmation. A per-order cap (POLYMARKET_MAX_BET_USD, default $25) and an optional session cap are enforced locally, and orders should not be split to get around them. On any error the agent reads the message, which names the next step, instead of retrying blindly.

Market buys take a dollar amount and market sells take a share count. Limit orders take a price and size, are GTC by default and can be maker-only. FOK orders fail unless filled whole, while FAK orders fill what they can. Prices are probabilities from 0 to 1. The excerpt is cut off before the region and redemption details.

When your agent uses it

  • Placing a buy or sell order on a Polymarket market
  • Setting up the deposit wallet, funding and approvals before a first trade
  • Checking open positions and redeeming winnings after a market resolves
  • Working out why an order was rejected, such as a region block or a missing approval

Example prompts

  • “Show me the dry-run preview for a market buy on the Yes side of this election market before placing anything.”
  • “Redeem my winnings from the resolved markets in my Polymarket positions.”
  • “Set up my Polymarket deposit wallet and tell me what still needs funding.”

Requirements

  • A ClawRouter wallet key (BLOCKRUN_WALLET_KEY or the wallet.key file)
  • Funds in that wallet to place bets
  • The blockrun_polymarket tool from ClawRouter

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. **Never pass confirm:true unless the user explicitly approved that exact
  2. Per-order cap POLYMARKET_MAX_BET_USD (default $25) and optional session cap
  3. On ANY error, read the message — it says exactly what to do next (fund,

What it can do on your machine

Read from SKILL.md and the folder at commit e9b2bd5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • BLOCKRUN_WALLET_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Polymarket Trading loads about 1.8k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 668 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from BlockRunAI/blockrun-mcp at commit e9b2bd5, republished under its MIT licence (© BlockRunAI). 668 words, ~1,846 tokens.

Download SKILL.mdSave it as .claude/skills/polymarket-trading/SKILL.md (or your agent's skills folder).
name
polymarket-trading
description
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.

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/.session by 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

  1. Never pass confirm:true unless the user explicitly approved that exact trade. Call once WITHOUT confirm → show the dry-run preview → ask → re-call with confirm:true.
  2. 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.
  3. 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

# 0. No Polymarket account or API keys needed — the MCP bootstraps everything
#    from the user's own wallet on first setup. (Geoblock is already handled:
#    CLOB traffic routes through BlockRun's Finland egress by default. Set
#    POLYMARKET_CLOB_HOST only to use your own egress, or to hit Polymarket
#    directly from a permitted region.)

# 1. Provision + inspect (idempotent, safe to re-run any time)
blockrun_polymarket action:"setup"
# → deposit wallet address + funding instructions + region status

# 2. Fund the vault from the user's Base USDC — gasless x402, one call ($0.01 fee,
#    non-custodial). pUSD credit is ASYNC (minutes) — re-run setup to watch it. Min $2.
blockrun_polymarket action:"fund" amount_usd:5             # dry-run preview
blockrun_polymarket action:"fund" amount_usd:5 confirm:true

# 3. Sign the one-time gasless approval batch (after user consent)
blockrun_polymarket action:"setup" confirm:true

# 4. Find a market, then resolve the selected condition (paid data)
blockrun_markets path:"markets/search" params:{q:"Bitcoin",status:"open",venue:"polymarket",limit:"20"}
blockrun_markets path:"polymarket/markets/keyset" params:{condition_id:"0x...",status:"open",limit:"5"}

# 5. Preview, then place
blockrun_polymarket_read action:"preview" side:"buy" token_id:"..." amount_usd:5 order_type:"FOK"
blockrun_polymarket action:"buy" token_id:"..." amount_usd:5 order_type:"FOK" confirm:true
#   or limit: price:0.45 size:10 (GTC; order_type:"GTD" + expires_at for expiry)
#   or via condition: condition_id:"0x..." outcome:"Yes"

# 6. Manage
blockrun_polymarket_read action:"orders"                # open orders
blockrun_polymarket action:"cancel" order_id:"..."      # or all:true
blockrun_polymarket_read action:"positions"             # holdings + PnL + redeemable

# 7. Claim winnings after resolution (gasless)
blockrun_polymarket action:"redeem" condition_id:"0x..."             # preview
blockrun_polymarket action:"redeem" condition_id:"0x..." confirm:true

# 8. Cash out — pUSD → native USDC on Base, back to the user's agent wallet
blockrun_polymarket action:"withdraw"                                # dry-run (full balance)
blockrun_polymarket action:"withdraw" confirm:true                   # (partial: amount_usd:5)

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:true for 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.
Show full SKILL.md (308 more words)Show less

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).

© BlockRunAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/polymarket-trading of BlockRunAI/blockrun-mcp.

Open the folder on GitHubat commit e9b2bd5

Compare with similar skills

Polymarket Trading next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Polymarket Trading compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Polymarket Trading this skillBlockRunAI/blockrun-mcp391—~1.8kAutomated safety check: PassMIT
Polyclawchainstacklabs/polyclaw3591 repos~2kAutomated safety check: PassApache-2.0
Polymarket TradingBlockRunAI/ClawRouter6.6k—~1.4kAutomated safety check: PassMIT
Minara Crypto Trading and WalletMinara-AI/minara-skills362—~5.7kAutomated safety check: PassNone
Predexon Prediction Market DataBlockRunAI/ClawRouter6.6k—~4.7kAutomated safety check: PassMIT
Bitget Walletbitget-wallet-ai-lab/bitget-wallet-skill245—~7.6kAutomated safety check: PassMIT

Similar skills

  • Polyclaw

    chainstacklabs/polyclaw

    Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.

    359 GitHub starsUsed in 1 repo~2k tokens
    Business, Finance & HRAuto-check passed
  • Polymarket Trading

    BlockRunAI/ClawRouter

    A skill your agent uses when the user wants to actually PLACE, manage, or redeem bets on Polymarket (not just read odds — that's the blockrunpredexon data tools).

    6.6k GitHub stars~1.4k tokensUpdated 3 days ago
    Business, Finance & HRAuto-check passed
  • Minara Crypto Trading and Wallet

    Minara-AI/minara-skills

    Drives the Minara CLI for crypto swaps, perps, limit orders, wallet transfers, deposits and withdrawals, plus AI market analysis.

    362 GitHub stars~5.7k tokensUpdated 22 days ago
    Business, Finance & HRAuto-check passed
  • Predexon Prediction Market Data

    BlockRunAI/ClawRouter

    Reads structured prediction market data for Polymarket, Kalshi and other venues through a local BlockRun gateway: markets, search, leaderboards, wallet analytics and odds.

    6.6k GitHub stars~4.7k tokensUpdated 3 days ago
    Business, Finance & HRAuto-check passed
  • Bitget Wallet

    bitget-wallet-ai-lab/bitget-wallet-skill

    Interact with Bitget Wallet API for crypto market data, token info, swap quotes, RWA (real-world asset) stock trading, and security audits.

    245 GitHub stars~7.6k tokensUpdated 4 mo ago
    Business, Finance & HRAuto-check passed
  • Crypto Hft

    alsk1992/CloddsBot

    Trade crypto binary markets on Polymarket with 4 automated strategies.

    2.9k GitHub stars~1.9k tokensUpdated 6 days ago
    Business, Finance & HRAuto-check passed

More from BlockRunAI/blockrun-mcp

All 17 skills in this repo
  • Signal To Trade Demo

    BlockRunAI/blockrun-mcp

    Prepare or run a polished BlockRun trading demo that discovers a current Polymarket market, combines live price, probability history, smart-money, and liquidity evidence into a balanced signal…

    391 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Blockrun

    BlockRunAI/blockrun-mcp

    Pay-per-call access to AI models, real-time data, media generation and multi-chain RPC over x402 micropayments (USDC on Base or Solana), or a BlockRun account API key.

    391 GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Blockrun Debug

    BlockRunAI/blockrun-mcp

    A skill your agent uses when the BlockRun MCP server (@blockrun/mcp) is installed but misbehaving — 'Failed to connect', spawn npx ENOENT, blockrun missing from claude mcp list, HTTP 402 /…

    391 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Blockrun Setup

    BlockRunAI/blockrun-mcp

    A skill your agent uses when asked to install, add, configure, or set up the BlockRun MCP server (@blockrun/mcp) in Claude Code, Claude Desktop, Cursor, Windsurf, Codex CLI, Grok or another MCP…

    391 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Blockrun Upgrade

    BlockRunAI/blockrun-mcp

    A skill your agent uses when the BlockRun MCP server prints 'Update available', when asked to upgrade, update, or pin @blockrun/mcp, when a fix 'should be in the new version' but the client still…

    391 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Crypto Data

    BlockRunAI/blockrun-mcp

    A skill your agent uses for any crypto data question — token/coin prices, FX, commodities, stocks, OHLC history, DEX pairs and liquidity, DeFi TVL, yield/APY pools, or raw JSON-RPC against a chain…

    391 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Polymarket Trading

What does Polymarket Trading do?

Lets the agent place, manage and redeem real-money Polymarket bets through ClawRouter, with a dry-run preview and your confirmation before any order. The blockrun_polymarket tool trades on Polymarket's CLOB V2 on Polygon. Orders are signed locally with your ClawRouter wallet key, and bets are paid from a deposit wallet derived from that key and held in pUSD.

When should I use Polymarket Trading?

Polymarket Trading fits situations like: placing a buy or sell order on a Polymarket market; setting up the deposit wallet, funding and approvals before a first trade; checking open positions and redeeming winnings after a market resolves; working out why an order was rejected, such as a region block or a missing approval.

How do I install Polymarket Trading in Claude Code?

Run `npx skills add BlockRunAI/blockrun-mcp --skill polymarket-trading -a claude-code`. Or copy the skill folder (skills/polymarket-trading in BlockRunAI/blockrun-mcp) into .claude/skills/polymarket-trading in your project. Claude Code loads it when a task matches its description.

How do I install Polymarket Trading in Codex?

Run `npx skills add BlockRunAI/blockrun-mcp --skill polymarket-trading -a codex`. Or copy the skill folder (skills/polymarket-trading in BlockRunAI/blockrun-mcp) into .agents/skills/polymarket-trading in your project. Codex loads it when a task matches its description.

Can I use Polymarket Trading in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add BlockRunAI/blockrun-mcp --skill polymarket-trading -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/polymarket-trading, .gemini/skills/polymarket-trading, .github/skills/polymarket-trading and .opencode/skills/polymarket-trading in your project.

What does Polymarket Trading need to run?

Going by SKILL.md and its folder, Polymarket Trading needs credentials named BLOCKRUN_WALLET_KEY. Our summary lists: A ClawRouter wallet key (BLOCKRUN_WALLET_KEY or the wallet.key file); Funds in that wallet to place bets; The blockrun_polymarket tool from ClawRouter.

Does Polymarket Trading access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Polymarket Trading safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Polymarket Trading use?

Polymarket Trading is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Polymarket Trading use?

About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Polymarket Trading?

Skills that share tags, products or a category with Polymarket Trading: Polyclaw (chainstacklabs/polyclaw, 359 stars), Polymarket Trading (BlockRunAI/ClawRouter, 6.6k stars), Minara Crypto Trading and Wallet (Minara-AI/minara-skills, 362 stars) and Predexon Prediction Market Data (BlockRunAI/ClawRouter, 6.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Polymarket Trading?

BlockRunAI (a GitHub organization) maintains it in BlockRunAI/blockrun-mcp, which has 391 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 8, 2026.

Source: BlockRunAI/blockrun-mcp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.