# polymarket-api

Provides integration patterns for Polymarket CLOB and Gamma APIs, covering market subscriptions, fee calculation, and order execution.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 967 installs · ★ 26
- Author: agentmc15
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/agentmc15/polymarket-trader/tree/HEAD/.claude/skills/polymarket-api/SKILL.md
- Updated: 2026-09-13
- HTML: https://affpapa.org/en/nevibecode/skills/polymarket-api

## What it does

This skill guides coding assistants through interacting with Polymarket endpoints on the Polygon network (chain ID 137). It covers the Central Limit Order Book (CLOB) at `https://clob.polymarket.com` across three authentication levels, alongside event querying via Gamma API at `https://gamma-api.polymarket.com`. Implementation snippets use Python with `py-clob-client`, `httpx`, and asynchronous WebSockets.

In market queries, `condition_id` acts as the overall market identifier, while `token_id` targets specific outcome orderbooks. Mixing them up causes invalid API responses. Polymarket operates as a taker-only venue where maker fees remain 0. If reading `taker_base_fee` directly from market payloads, code must divide the integer by 10,000, since values arrive in basis points rather than standard decimal rates.

Submitting transactions requires private key credentials and a funder address in environment variables. Public endpoints enforce a threshold of around 100 calls per minute, while authenticated endpoints allow roughly 1000.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add agentmc15/polymarket-trader --skill polymarket-api -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add agentmc15/polymarket-trader --skill polymarket-api -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add agentmc15/polymarket-trader --skill polymarket-api -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install agentmc15/polymarket-trader polymarket-api
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add agentmc15/polymarket-trader --skill polymarket-api -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/agentmc15/polymarket-trader --path .claude/skills/polymarket-api
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add agentmc15/polymarket-trader --skill polymarket-api -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/agentmc15/polymarket-trader/tree/HEAD/.claude/skills/polymarket-api/SKILL.md

## When to use it
- Configure `py-clob-client` for automated limit orders on Polygon
- Stream real-time orderbook updates over market WebSockets
- Retrieve active event metadata using the Gamma REST client
- Calculate taker fees based on market category rates

## Example prompts
- Write a Python script using `py-clob-client` to place a GTC buy order.
- Show how to connect to the Polymarket WebSocket feed for market updates.
- How do I calculate the taker fee when given a category rate and fill price?

## Similar
- [churn-prevention](https://affpapa.org/en/nevibecode/skills/coreyhaines31-churn-prevention.md) — skill · 121000 installs
- [revops](https://affpapa.org/en/nevibecode/skills/revops.md) — skill · 113500 installs
- [community-marketing](https://affpapa.org/en/nevibecode/skills/community-marketing.md) — skill · 89500 installs
- [ads](https://affpapa.org/en/nevibecode/skills/ads.md) — skill · 82800 installs
- [pricing](https://affpapa.org/en/nevibecode/skills/pricing.md) — skill · 79300 installs
- [marketing-plan](https://affpapa.org/en/nevibecode/skills/marketing-plan.md) — skill · 67900 installs

From the same set: [agentmc15/polymarket-trader](https://affpapa.org/en/nevibecode/by/agentmc15/polymarket-trader.md) — 2 cards

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