polymarket-api — Claude Code skill: what it does, how to install
Provides integration patterns for Polymarket CLOB and Gamma APIs, covering market subscriptions, fee calculation, and order execution.
npx skills add agentmc15/polymarket-trader --skill polymarket-api -a claude-codeWhat polymarket-api 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.
What it helps with
- Configure
py-clob-clientfor 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 for the agent
- Write a Python script using
py-clob-clientto 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?
How to install polymarket-api
1Skills CLI (Vercel)
npx skills add agentmc15/polymarket-trader --skill polymarket-api -a claude-code2Manually: put the files in place
~/.claude/skills/polymarket-api/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/polymarket-api/
1Skills CLI (Vercel)
npx skills add agentmc15/polymarket-trader --skill polymarket-api -a codex2Manually: put the files in place
.agents/skills/polymarket-api/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add agentmc15/polymarket-trader --skill polymarket-api -a cursor2Manually: put the files in place
.cursor/skills/polymarket-api/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install agentmc15/polymarket-trader polymarket-api2Manually: put the files in place
.github/skills/polymarket-api/SKILL.md1Skills CLI (Vercel)
npx skills add agentmc15/polymarket-trader --skill polymarket-api -a gemini-cli2Platform CLI
gemini skills install https://github.com/agentmc15/polymarket-trader --path .claude/skills/polymarket-apiManually: put the files in place
.devin/skills/polymarket-api/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add agentmc15/polymarket-trader --skill polymarket-api -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about polymarket-api
How do I install polymarket-api in Claude Code?
Run npx skills add agentmc15/polymarket-trader --skill polymarket-api -a claude-code. The file will be placed in ~/.claude/skills/polymarket-api/SKILL.md.
What does the polymarket-api skill do?
It supplies reference architectures, Python snippets, and endpoint details for Polymarket CLOB and Gamma APIs. It assists with order placement, price calculation, and market data ingestion.
Why is dividing taker_base_fee by 10,000 required?
The CLOB API returns fee overrides in basis points instead of decimal values. For instance, a fee entry of 700 represents 0.07, so omitting the division inflates calculated costs by 10,000 times.