How to Get a Polymarket API Key

TL;DR
- You don't need a key to read Polymarket data: prices, order books, price history and markets are public.
- You do need API credentials to place or cancel orders. On the international site they're created from your wallet's private key.
- In 2026 Polymarket moved to a new order system (CLOB V2) and a new official SDK:
polymarket-clientfor Python and@polymarket/clientfor TypeScript. The oldpy-clob-clientno longer works, andpy-clob-client-v2is deprecated. - Polymarket US has its own API. You create keys at polymarket.us/developer after verifying your account, and use the
polymarket-usSDK. - Never share or commit your private key or API secret. Anyone who has them can trade your money.
Which API do you need?
| You want to... | You need |
|---|---|
| Read prices, order books, market lists, trade history | No key. Use the public APIs. |
| Place and cancel orders on international Polymarket | CLOB API credentials, made from your wallet |
| Trade on Polymarket US through code | A Polymarket US API key (Key ID + secret) |
Reading data without a key
Polymarket's read-only data is public. The main sources are:
- Gamma API (
gamma-api.polymarket.com): markets, events, questions and metadata. - CLOB API: live order books, best prices, midpoints and price history.
- Data API (
data-api.polymarket.com): trades, positions and activity.
In the new SDK these are wrapped in a public client that needs no credentials. A quick way to check you're set up is to request a market's order book and print the best bid and ask.
Here it is with the new SDK, reading a live esports market with no key at all:

This is how we build our backtests: we replay public trade data and real historical prices to see what a strategy would have done before we send a single tip.
Getting CLOB API credentials (international Polymarket)
To trade, the CLOB needs to know the orders come from you. It uses two levels of authentication:
- L1 (your wallet): you sign a message with your wallet's private key. This proves you own the wallet and is used to create or retrieve your API credentials.
- L2 (API credentials): an API key, secret and passphrase. Every trading request is signed with these.
The easy way: the official SDK
Install the Python SDK:
pip install polymarket-client
The SDK's secure client creates or fetches your API credentials for you, from your private key and wallet address:
import asyncio, os
from polymarket import AsyncSecureClient
async def main():
client = await AsyncSecureClient.create(
private_key=os.environ["POLY_PRIVATE_KEY"], # never hard-code this
wallet=os.environ["POLY_WALLET"], # your Polymarket account address
)
# client now holds your API credentials and can place orders
asyncio.run(main())
If you leave out wallet, the SDK sets up a new "deposit wallet" for you. Wallets created from May 2026 onwards use this type by default.
For TypeScript, install @polymarket/client and use createSecureClient.
Moving from the old client
If you have code using py-clob-client, it stopped working when Polymarket switched to CLOB V2 on 28 April 2026. Its replacement, py-clob-client-v2, was itself deprecated in October 2026. The old pattern looked like this:
ClobClient(host, chain_id=137, key=PK).create_or_derive_api_key()
Polymarket's migration guide covers the move to the unified SDK. Your existing API credentials carried over, so you don't need new ones.
Doing it by hand (raw API)
If you're not using an SDK:
- Sign an EIP-712
ClobAuthmessage with your wallet (Polygon, chain ID 137). - Send it to
POST /auth/api-keyto create credentials, orGET /auth/derive-api-keyto get back ones you already made. - You receive
apiKey,secretandpassphrase. - Sign each trading request with an HMAC-SHA256 of the timestamp, method, path and body, and send it with the
POLY_ADDRESS,POLY_SIGNATURE,POLY_TIMESTAMP,POLY_API_KEYandPOLY_PASSPHRASEheaders.
Other keys in your settings
Your Polymarket settings also have Relayer API keys (for submitting on-chain transactions without paying gas), Session keys and a Builders section (for apps that route orders and want them credited). Most individual traders don't need these.

The same page has Reset trading access, which re-signs with your wallet to restore your account's trading credentials if they stop working.
Getting a Polymarket US API key
Polymarket US has two APIs: a Retail API for personal accounts and an Exchange API for institutions and brokers.
For a personal account:
- Sign up and complete identity verification in the Polymarket US app.
- Go to polymarket.us/developer and create a key.
- Copy the Key ID and secret straight away. The secret is only shown once.
- Install the SDK and connect:
pip install polymarket-us
import os
from polymarket_us import PolymarketUS
client = PolymarketUS(
key_id=os.environ["PMUS_KEY_ID"],
secret_key=os.environ["PMUS_SECRET"],
)
Create the client with no arguments and you get public data only. Requests are signed with Ed25519, and the timestamp must be within 30 seconds of the server's clock, so keep your computer's time synced.
Rate limits
International Polymarket (per IP, every 10 seconds; going over slows you down rather than blocking you):
| Endpoint | Limit |
|---|---|
| Gamma API overall | 4,000 requests |
Gamma /markets |
300 requests |
| CLOB overall | 9,000 requests |
CLOB /book |
1,500 requests |
| Placing orders | 5,000 burst; 120,000 per 10 minutes sustained |
Polymarket US: 25 requests a second overall, and 1 a second for combos and quotes. Going over returns an HTTP 429 error.
Keeping your keys safe
- Store keys in environment variables or a secrets manager, never in your code.
- Add your
.envfile to.gitignorebefore your first commit. - Use a separate wallet with only the money you're trading.
- If a key leaks, revoke it and create a new one straight away. If your private key leaks, move your funds to a new wallet.
- Polymarket staff will never ask for your private key. Neither will any legitimate tool.
Would rather not build a bot? Prediction Alpha Bot runs one for you: it watches every Polymarket trade and sends tested strategies to Telegram.
FAQ
Is the Polymarket API free? Yes. There's no charge for API access. Normal trading fees apply to orders.
Do I need an API key to get Polymarket prices? No. Prices, order books and market data are public.
Does py-clob-client still work?
No. It stopped working with the CLOB V2 upgrade in April 2026. Use the unified polymarket-client SDK.
Can I use the Polymarket API from the US? US users should use the Polymarket US API. The international site is close-only for the US.
Can I build a trading bot on Polymarket? Yes, many traders do. Test it on small stakes, respect the rate limits, and expect the order system to change from time to time.
Not financial advice. Prediction markets carry risk and you can lose the full amount you stake. Check that Polymarket is available where you live.


