Polymarket integration for prediction market trading on Polygon. Covers authentication (L1 EIP-712, L2 HMAC-SHA256, builder headers), order placement (GTC/GTD/FOK/FAK, batch, post-only, heartbeat), market data (Gamma API, Data API, orderbook, subgraph), WebSocket streaming (market/user/sports channels), CTF operations (split, merge, redeem, negative risk), bridge (deposits, withdrawals, multi-chain), and gasless relayer transactions. Use when building AI agents, autonomous market makers, prediction market UIs, or any application integrating with Polymarket on Polygon.
Requires network access to Polymarket APIs (clob.polymarket.com, gamma-api.polymarket.com) and Polygon RPC
Polymarket Skill
When to use this skill
Use this skill when the user asks about or needs to build:
Polymarket API authentication (L1/L2, API keys, HMAC signing)
Active until expiration (UTC seconds). Min = now + 60 + N
Auto-expire before events
FOK
Fill entirely immediately or cancel
All-or-nothing market orders
FAK
Fill what's available, cancel rest
Partial-fill market orders
FOK/FAK BUY: amount = dollar amount to spend
FOK/FAK SELL: amount = number of shares to sell
Post-only: GTC/GTD only — rejected if would cross spread
Quick Reference: Signature Types
Type
Value
Description
EOA
0
Standard Ethereum wallet (MetaMask). Funder is the EOA address and will need POL for gas.
POLY_PROXY
1
Custom proxy wallet for Magic Link email/Google users who exported PK from Polymarket.com.
GNOSIS_SAFE
2
Gnosis Safe multisig proxy wallet (most common). Use for any new or returning user.
Core Pattern: Place an Order
TypeScript
constresponse=awaitclient.createAndPostOrder({tokenID:"TOKEN_ID",price: 0.50,size: 10,side: Side.BUY,},{tickSize:"0.01",// from client.getTickSize(tokenID) or market object
negRisk: false,// from client.getNegRisk(tokenID) or market object
},OrderType.GTC);console.log(response.orderID,response.status);