Polymarket Integration
The polymarket tool now supports market browsing and trading via these APIs:
- Gamma API (
https://gamma-api.polymarket.com) - CLOB API (
https://clob.polymarket.com)
Supported Read Operations
| Operation | Description |
|---|---|
list_markets | List markets |
get_market | Get market details |
list_events | List events |
get_orderbook | Get order book |
get_price | Get price |
get_positions | Get positions |
get_balance | Get balance |
get_open_orders | Get open orders |
get_usdc_allowance | Get USDC allowance |
Supported Write Operations
| Operation | Description |
|---|---|
place_order | Place order |
cancel_order | Cancel order |
Authentication and Signing Flow
L1 Handshake (One-time Bootstrap)
- Sign CLOB
ClobAuthEIP-712 payload with Polygon chain id137 - Call
POST /auth/api-key; fall back toGET /auth/derive-api-keyif needed - Persist the returned
{ apiKey, secret, passphrase }for L2
L2 Authenticated Requests
Each authenticated CLOB request is signed:
timestamp + method + request_path (+ body for POST)
Order Signing
place_order signs EIP-712 orders with domain:
- name:
Polymarket CTF Exchange - version:
1 - chain id:
137
Configuration
Config path: integrations.polymarket
| Field | Default |
|---|---|
enabled | false |
gamma_base_url | https://gamma-api.polymarket.com |
clob_base_url | https://clob.polymarket.com |
timeout_secs | 15 |
USDC Allowance
get_usdc_allowance only reports allowance status; it does not change chain state.
- Token: USDC.e on Polygon
- Spender: Polymarket exchange
Error and Retry Behavior
- 4xx errors are treated as client errors and not retried
- 429 and 5xx errors are treated as transient, retried up to 3 times
- Fixed 500ms backoff between retries
Next Steps
- Third-party Integrations - Integration overview
- Tool-scoped Memory - Tool memory