polymarket-trading

polymarket-trading is a skill for Claude Code, Codex from BlockRunAI/blockrun-mcp. It costs 72 tokens per session (1,846 once invoked), scanned A, original, MIT.

A skill for placing, managing, and redeeming real-money bets on Polymarket, a prediction market where people trade positions on future events.

In plain words
What is it for?
Use it to set up the wallet, deposit funds, buy or sell positions, view holdings, redeem winnings, and complete supported Polymarket trades.
Why use it?
It provides the steps and safeguards needed to fund positions, trade them, handle winnings, and deal with access restrictions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to set up the wallet, deposit funds, buy or sell positions, view holdings, redeem winnings, and complete supported Polymarket trades.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/blockrunai/blockrun-mcp/polymarket-trading
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add BlockRunAI/blockrun-mcp --skill polymarket-trading
Clone the repo
git clone --depth 1 https://github.com/BlockRunAI/blockrun-mcp

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin polymarket-trading/plugin install polymarket-trading after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for polymarket-trading

README.md
[![agentmods](https://agentmods.dev/badge/skills/blockrunai/blockrun-mcp/polymarket-trading/github.svg)](https://agentmods.dev/skills/blockrunai/blockrun-mcp/polymarket-trading)
Your own site
<a href="https://agentmods.dev/skills/blockrunai/blockrun-mcp/polymarket-trading"><img src="https://agentmods.dev/badge/skills/blockrunai/blockrun-mcp/polymarket-trading/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for polymarket-trading

Your own site · 80×15
<a href="https://agentmods.dev/skills/blockrunai/blockrun-mcp/polymarket-trading"><img src="https://agentmods.dev/badge/skills/blockrunai/blockrun-mcp/polymarket-trading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,846 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00072 $0.01846
Opus 5 $0.00036 $0.00923
Sonnet 5 $0.00014 $0.00369
Haiku 4.5 $0.00007 $0.00185

Measured 9d ago against content hash fd57e87991cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

polymarket-trading scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/polymarket-trading/SKILL.md · 128 lines

How it starts

The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Read the full file on GitHub · 128 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 128 lines · 72 tokens per session scan A fd57e87991cf

Subscribe to this mod's changes

polymarket-trading is a skill published in the GitHub repository BlockRunAI/blockrun-mcp (393 stars, last pushed yesterday), licensed MIT. It adds 72 tokens to every session and 1,846 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.