polymarket-knowledge
Original:🇺🇸 English
Translated
Polymarket CLOB API knowledge base for order management, WebSocket events, and trading operations. Use when working with order lifecycle (place, fill, cancel), debugging WebSocket USER_TRADE/USER_ORDER events, understanding API field mappings, or implementing trading logic.
8installs
Sourcecyl19970726/poly-sdk
Added on
NPX Install
npx skill4agent add cyl19970726/poly-sdk polymarket-knowledgeTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Polymarket Knowledge
Overview
Comprehensive reference for Polymarket CLOB API integration, focusing on order management and real-time event handling.
Quick Reference
Order Types
| Type | Behavior | Use Case |
|---|---|---|
| GTC | Good Till Cancelled | Maker orders, liquidity provision |
| GTD | Good Till Date | Time-limited orders |
| FOK | Fill Or Kill | Must fill completely or cancel |
| FAK | Fill And Kill | Fill what you can, cancel rest |
Order Requirements
- Minimum order value: $1 USDC
- Minimum shares: 5
- Tick size: 0.01 (prices must be 0.01, 0.02, ... 0.99)
Order State Machine
See references/order-state-machine.md for complete state diagram and transitions.
States: PENDING → OPEN → PARTIALLY_FILLED → FILLED/CANCELLED/EXPIRED
API Status Mapping:
- → OPEN
live - (partial) → PARTIALLY_FILLED
matched - (full) → FILLED
matched - → PENDING
delayed - → CANCELLED
cancelled - → EXPIRED
expired
WebSocket Events
See references/websocket-events.md for field mappings and examples.
Key Endpoints:
- Market:
wss://ws-subscriptions-clob.polymarket.com/ws/market - User: (authenticated)
wss://ws-subscriptions-clob.polymarket.com/ws/user
USER_ORDER Event Types: PLACEMENT, UPDATE, CANCELLATION
USER_TRADE Statuses: MATCHED, MINED, CONFIRMED, RETRYING, FAILED
Common Pitfalls
- Wrong field names: API uses not
matched_amount,matched_sizenotsize_matchedmatched_size - Wrong endpoint: USER events require , not
/ws/user/ws/market - USDC type: Polymarket uses USDC.e (bridged), not native USDC
Resources
- references/order-state-machine.md - State transitions and validation
- references/websocket-events.md - WebSocket field mappings
- references/api-field-mappings.md - API response field reference