Integration Surfaces
- REST APIs
- WebSocket APIs
Gamma API
https://gamma-api.polymarket.comDiscover events and markets, and retrieve the metadata needed to work with
them.CLOB API
https://clob.polymarket.comRead prices and order books, then place and manage orders.Data API
https://data-api.polymarket.comAnalyze positions, activity, and market participation.Relayer API
https://relayer-v2.polymarket.comSubmit wallet transactions without requiring the account to hold POL for
gas.When to Use the API
Use direct integration when:- Your runtime is not supported by an official SDK.
- You need exact control over request signing, headers, retries, or transport.
- You need an endpoint or wire format that is not exposed by an SDK yet.
Make a Public Request
Public market data is available without credentials. For example, list active markets from the Gamma API:Authentication
CLOB authentication has two layers:
Order placement uses L2 to authenticate the request and a wallet signature to
authorize the order itself.
To authenticate private CLOB requests, follow these steps:
1
Create L1 Typed Data
Build the Provide these values:
ClobAuth typed-data payload.clobAuthTypedData
2
Create a CLOB L1 Signature
Sign The returned
clobAuthTypedData with the private key that controls
<signer_address>. This example uses Viem.clobL1Signature is the L1 signature for this payload.3
Create or Derive CLOB API Credentials
Use the signer address, timestamp, and nonce from Step 1 with the signature from
Step 2 to create credentials. If credentials already exist for that address and
nonce, derive them instead.The response contains the three values used for L2 authentication:Where:
apiKeyis the unique identifier for the API credentials.secretis the base64-encoded key used to sign L2 requests with HMAC-SHA256.passphraseis the credential value sent in thePOLY_PASSPHRASEheader.
4
Create a CLOB L2 Signature
Whenever you need to authenticate a request, create a new Unix timestamp in
seconds. Concatenate the timestamp, uppercase HTTP method, route path, and exact
serialized request body, then sign the result with the API credentials For requests with a body, append the exact serialized body sent over the wire.
secret.The example request uses GET /data/orders, which has no body:5
Send an Authenticated Request
Use the timestamp and L2 signature from Step 4 with the signer address and API
credentials from Step 3. This request retrieves the account’s open orders.L2-authenticated CLOB requests use the same five headers:
Next Steps
Read Market Data
Discover markets and work with prices, order books, and historical data.
Subscribe to Real-Time Updates
Stream market and account updates as they happen.
Place Your First Order
Set up an account and complete your first authenticated trade.