polymarket

Integrates Polymarket CLOB trading, authentication, order management, and conditional token operations on Polygon.

1|1|Updated May 21, 2026
One-click install
npx skills add https://github.com/naruto11eth/cryptoskills --skill polymarket-naruto11eth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: polymarket
Source: https://github.com/naruto11eth/cryptoskills/tree/main/skills/polymarket
Command: npx skills add https://github.com/naruto11eth/cryptoskills --skill polymarket-naruto11eth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLMs have stale or incorrect knowledge about Polymarket's APIs, leading to hallucinated contract addresses, wrong authentication flows, and rejected orders. This Skill provides verified, current integration patterns for the Polymarket CLOB prediction market on Polygon. ## Core Features & Use Cases - Two-Level Authentication: Implements L1 EIP-712 signing to derive API credentials and L2 HMAC-SHA256 signing for all trading requests, with correct signature type and funder address handling. - Order Management: Places GTC, GTD, FOK, and FAK orders, batch orders up to 15, post-only orders, cancellations, and heartbeat-based dead man's switch protection. - Market Data & WebSockets: Reads orderbooks, midpoints, spreads, and price history from CLOB and Gamma APIs, and subscribes to real-time market and user WebSocket channels with proper PING heartbeats. - CTF Operations & Gasless Trading: Splits USDC into outcome tokens, merges positions, redeems winnings, and executes gasless transactions via the Builder Program relayer. - Use Case: Build a market-making bot that quotes bid/ask around the midpoint on a live market, maintains heartbeat protection, and cancels all orders on shutdown using the included starter template. ## Quick Start Ask the agent to place a GTC limit buy order on a Polymarket token using the clob-client SDK with my private key and funder address.

Frequently Asked Questions about polymarket

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I place an order on Polymarket programmatically?

Use the @polymarket/clob-client SDK to create and post orders after deriving API credentials via createOrDeriveApiKey(). Initialize the client with your signer, credentials, signature type, and funder address, then call createAndPostOrder with tokenID, price, size, side, tick size, and order type.

How does Polymarket API authentication work?

Polymarket uses two-level auth: L1 signs an EIP-712 message with your wallet to create API credentials, and L2 uses HMAC-SHA256 signatures from those credentials on every trading request. You also need a funder address and the correct signature type (0=EOA, 1=POLY_PROXY, 2=GNOSIS_SAFE).

Can I use ethers v6 with the Polymarket clob-client?

No, the @polymarket/clob-client SDK requires ethers v5 because ethers v6 changed the Signer interface and is not compatible. Install ethers@^5.7.0 for trading operations, though viem can be used for direct CTF contract calls.

Why does my Polymarket order get rejected with INVALID_ORDER_MIN_TICK_SIZE?

The order price does not conform to the market's tick size, which can be 0.1, 0.01, 0.001, or 0.0001. Query the tick size with getTickSize(tokenID) before placing orders, and watch for tick_size_change WebSocket events when prices approach 0 or 1.

Why does my Polymarket WebSocket connection drop after 10 seconds?

The connection drops because you are not sending heartbeat messages. Send a PING text message every 10 seconds after connecting, and note that the market channel subscribes by token IDs while the user channel subscribes by condition IDs.

How do I split USDC into Polymarket outcome tokens?

Call splitPosition on the CTF contract (0x4D97DCd97eC945f40cF65F87097ACe5EA0476045) with the USDC address, zero parent collection ID, the market condition ID, partition [1, 2], and the amount. You must first approve USDC for the CTF contract, not the Exchange contract.