Installation
Quick Start
1. Setup Client
This quick start sets your EOA as the trading account. You’ll need to fund this
wallet to trade and pay for gas on transactions. Gas-less transactions are only
available by deploying a proxy wallet and using Polymarket’s Polygon relayer
infrastructure.
Signature Types
Signature Types
| Wallet Type | ID | When to Use |
|---|---|---|
| EOA | 0 | Standard Ethereum wallet (MetaMask) |
| Custom Proxy | 1 | Specific to Magic Link users from Polymarket only |
| Gnosis Safe | 2 | Injected providers (Metamask, Rabby, embedded wallets) |
2. Place an Order
3. Check Your Orders
Complete Example
Troubleshooting
Error: L2_AUTH_NOT_AVAILABLE
Error: L2_AUTH_NOT_AVAILABLE
You forgot to call
createOrDeriveApiKey(). Make sure you initialize the client with API credentials:Order rejected: insufficient balance
Order rejected: insufficient balance
Ensure you have:
- USDC in your funder address for BUY orders
- Outcome tokens in your funder address for SELL orders
Order rejected: insufficient allowance
Order rejected: insufficient allowance
You need to approve the Exchange contract to spend your tokens. This is typically done through the Polymarket UI on your first trade. Or use the CTF contract’s
setApprovalForAll() method.What's my funder address?
What's my funder address?
Your funder address is the Polymarket proxy wallet where you deposit funds. Find it:
- Go to polymarket.com/settings
- Look for “Wallet Address” or “Profile Address”
- This is your
FUNDER_ADDRESS