Overview
The CLOB (Central Limit Order Book) is Polymarket’s order matching system. Order attribution adds builder authentication headers when placing orders through the CLOB Client, enabling Polymarket to credit trades to your builder account. This allows you to:- Track volume on the Builder Leaderboard
- Compete for grants based on trading activity
- Monitor performance via the Data API
Builder API Credentials
Each builder receives API credentials from their Builder Profile:| Credential | Description |
|---|---|
key | Your builder API key identifier |
secret | Secret key for signing requests |
passphrase | Additional authentication passphrase |
Signing Methods
- Remote Signing (Recommended)
- Local Signing
Remote signing keeps your credentials secure on a server you control.How it works:
- User signs an order payload
- Payload is sent to your builder signing server
- Your server adds builder authentication headers
- Complete order is sent to the CLOB
Server Implementation
Your signing server receives request details and returns the authentication headers. Use thebuildHmacSignature function from the SDK:Client Configuration
Point your client to your signing server:Troubleshooting
Invalid Signature Errors
Invalid Signature Errors
Error: Client receives invalid signature errorsSolution:
- Verify the request body is passed correctly as JSON
- Check that
path,body, andmethodmatch what the client sends - Ensure your server and client use the same Builder API credentials
Missing Credentials
Missing Credentials
Error:
Builder credentials not configured or undefined valuesSolution: Ensure your environment variables are set:POLY_BUILDER_API_KEYPOLY_BUILDER_SECRETPOLY_BUILDER_PASSPHRASE
Authentication Headers
The SDK automatically generates and attaches these headers to each request:| Header | Description |
|---|---|
POLY_BUILDER_API_KEY | Your builder API key |
POLY_BUILDER_TIMESTAMP | Unix timestamp of signature creation |
POLY_BUILDER_PASSPHRASE | Your builder passphrase |
POLY_BUILDER_SIGNATURE | HMAC signature of the request |
With local signing, the SDK constructs and attaches these headers automatically. With remote signing, your server must return these headers (see Server Implementation above), and the SDK attaches them to the request.