Polymarket’s Relayer Client enables gasless transactions for your users. Instead of requiring users to hold POL for gas, Polymarket’s infrastructure pays all transaction fees. This creates a seamless experience where users only need pUSD to trade.Documentation Index
Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
Use this file to discover all available pages before exploring further.
How It Works
The relayer acts as a transaction sponsor:- Your app creates a transaction
- The user signs it with their private key
- Your app sends it to Polymarket’s relayer
- The relayer submits it onchain and pays the gas fee
- The transaction executes from the user’s wallet
What Is Covered
Polymarket pays gas for all operations routed through the relayer:| Operation | Description |
|---|---|
| Wallet deployment | Deploy deposit wallets for new API users |
| Token approvals | Approve contracts to spend pUSD or outcome tokens |
| CTF operations | Split, merge, and redeem positions |
| Transfers | Move tokens between addresses |
Authentication
The relayer uses Relayer API Keys. You can create one from Settings > API Keys on the Polymarket website.Already have a builder signing key? Your existing HMAC-based builder API
key keeps working with the Relayer — no need to rotate or reissue. Order
attribution is now associated with the native
builderCode field in CLOB V2.
See Migrating to CLOB V2 for context.| Header | Description |
|---|---|
RELAYER_API_KEY | Your Relayer API key |
RELAYER_API_KEY_ADDRESS | The address that owns the key |
If you want to use the Relayer API Key directly without the SDK, see the
Relayer API Reference.
Prerequisites
Before using the relayer, you need:| Requirement | Source |
|---|---|
| Relayer API Key | Settings > API Keys |
| User’s private key or signer | Your wallet integration |
| pUSD balance | For trading (not for gas) |
Installation
Client Setup
Initialize the relayer client with your Relayer API Key:Wallet Types
Use deposit wallets for new API users. Existing Safe and Proxy users can keep using their current wallet type and signature flow.| Type | Deployment | Best For |
|---|---|---|
| Deposit Wallet | Call deployDepositWallet() | New API users |
| Safe | Call deploy() before first transaction | Existing Safe integrations |
| Proxy | Auto-deploys on first transaction | Existing Polymarket.com proxy users |
For the new deposit wallet flow, including
WALLET-CREATE, signed WALLET
batches, and POLY_1271 CLOB orders, see the Deposit Wallet
Guide.Executing Transactions
Use theexecute method to send transactions through the relayer:
Token Approval
Approve contracts to spend tokens:Redeem Positions
Exchange winning tokens for pUSD after market resolution:Batch Transactions
Execute multiple operations atomically in a single call:Transaction States
Track transaction progress through these states:| State | Terminal | Description |
|---|---|---|
STATE_NEW | No | Transaction received by relayer |
STATE_EXECUTED | No | Submitted onchain |
STATE_MINED | No | Included in a block |
STATE_CONFIRMED | Yes | Finalized successfully |
STATE_FAILED | Yes | Failed permanently |
STATE_INVALID | Yes | Rejected as invalid |
Contract Addresses
See Contracts for all Polymarket smart contract addresses on Polygon.Resources
Next Steps
Negative Risk Markets
Learn about capital-efficient trading for multi-outcome events.
Positions & Tokens
Understand token operations like split, merge, and redeem.