Set Up Your Client
Derive your API credentials and initialize the trading client. This example uses an EOA wallet (type
0) — your wallet pays its own gas and acts as the funder:If you have a Polymarket.com account, your funds are in a proxy wallet — use
signature type
1 or 2 instead. See Signature
Types for details.Place an Order
Get a token ID from the Markets API, then create and submit your order:
Troubleshooting
L2 AUTH NOT AVAILABLE - Invalid Signature
L2 AUTH NOT AVAILABLE - Invalid Signature
Wrong private key, signature type, or funder address for the derived API credentials.
- Check that
signatureTypematches your account type (0,1, or2) - Ensure
funderis correct for your wallet type - Re-derive credentials with
createOrDeriveApiKey()if unsure
Order rejected - insufficient balance
Order rejected - insufficient balance
Your funder address doesn’t have enough tokens:
- BUY orders: need USDC.e in your funder address
- SELL orders: need outcome tokens in your funder address
- Ensure you have more USDC.e than what’s committed in open 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 using the CTF
contract’s
setApprovalForAll() method.What is my funder address
What is my funder address
Your funder address is the wallet where your funds are held:
- EOA (type 0): Your wallet address directly
- Proxy wallet (type 1 or 2): Go to polymarket.com/settings and look for the wallet address in the profile dropdown
Blocked by Cloudflare or Geoblock
Blocked by Cloudflare or Geoblock
You’re trying to place a trade from a restricted region. See Geographic Restrictions for details.