# web3-polymarket

A skill for Polymarket on Polygon: auth, order placement, market data, WebSocket streams and gasless transactions.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 578 installs · ★ 193
- Author: Polymarket
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Polymarket/agent-skills/tree/HEAD/SKILL.md
- Updated: 2026-02-19
- HTML: https://affpapa.org/en/nevibecode/skills/web3-polymarket

## What it does

The skill covers Polymarket integration end to end: deriving API credentials, placing and cancelling orders, reading the orderbook, fetching events and markets, and subscribing to WebSocket channels. It ships tables of base URLs, Polygon contract addresses, and code samples in TypeScript and Python for `@polymarket/clob-client` and `py-clob-client`.

Auth comes in two steps. L1 derives credentials from a private key. L2 initialises the trading client with those credentials, a signature type and the funder wallet address. Pick the signature type by wallet: `0` for a plain EOA, `1` for a Magic Link proxy, `2` for Gnosis Safe. An EOA needs POL for gas; the proxy options route through the relayer.

The skill needs network access to `clob.polymarket.com`, `gamma-api.polymarket.com` and a Polygon RPC. Run your agent behind a closed network and orderbook reads plus order submission fail right away. Order types are GTC, GTD, FOK and FAK. Post-only works with GTC and GTD only, and gets rejected when the price would cross the spread.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Polymarket/agent-skills --skill web3-polymarket -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/web3-polymarket/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/web3-polymarket/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Polymarket/agent-skills --skill web3-polymarket -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/web3-polymarket/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Polymarket/agent-skills --skill web3-polymarket -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/web3-polymarket/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Polymarket/agent-skills web3-polymarket
```

2. **Manually: put the files in place**
- File: `.github/skills/web3-polymarket/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Polymarket/agent-skills --skill web3-polymarket -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Polymarket/agent-skills
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/web3-polymarket/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Polymarket/agent-skills --skill web3-polymarket -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Polymarket/agent-skills/tree/HEAD/SKILL.md

## When to use it
- derive L1 and L2 API credentials from a private key
- place a limit order and track its status
- read best bid, ask, midpoint and spread for a token
- subscribe to order updates over WebSocket
- split, merge and redeem CTF positions

## Example prompts
- Show me how to derive Polymarket API credentials from a private key and init the trading client
- Place a GTC limit order for 10 dollars at 0.50 in this market
- Subscribe to the user WebSocket channel and print updates for my orders

## Similar
- [polymarket-analyzer](https://affpapa.org/en/nevibecode/skills/polymarket-analyzer.md) — skill · 486 installs
- [polymarket](https://affpapa.org/en/nevibecode/skills/polymarket.md) — skill · 1300 installs
- [web3-testing](https://affpapa.org/en/nevibecode/skills/web3-testing.md) — skill · 10800 installs
- [emblem-ai-prompt-examples](https://affpapa.org/en/nevibecode/skills/emblem-ai-prompt-examples.md) — skill · 8800 installs
- [trading-strategies](https://affpapa.org/en/nevibecode/skills/trading-strategies.md) — skill · 1200 installs
- [live-feed](https://affpapa.org/en/nevibecode/skills/live-feed.md) — skill · 550 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
