Recommended Free Tools
There is no single “Polymarket API” for a trading bot. Use Gamma to discover markets, the CLOB API to read tradable prices and manage orders, and the Data API to examine positions and activity. Add the relevant WebSocket when the bot needs ongoing updates. For private CLOB operations, wallet-based setup and authenticated requests are separate from the wallet signature that authorizes an order.
Which Polymarket API should a trading bot use?
Polymarket’s developer documentation separates API surfaces by job. A bot may use several in one workflow; choosing the right one depends on whether it is discovering markets, observing a book, trading, or monitoring an account.
As an Amazon Associate I earn from qualifying purchases.
| Surface | Use it for | Access and notes |
|---|---|---|
Gamma APIhttps://gamma-api.polymarket.com |
Discover events and markets; retrieve market metadata. | Public market reads do not require credentials. A common starting point for finding a market and its outcome identifiers. |
CLOB APIhttps://clob.polymarket.com |
Read prices and order books, and place or manage orders. | Public market data can be read without credentials; private trading requests require authentication. |
Data APIhttps://data-api.polymarket.com |
Analyze positions, activity, and market participation. | The API overview describes cursor pagination and a shared response envelope. |
Relayer APIhttps://relayer-v2.polymarket.com |
Submit wallet transactions. | Polymarket’s overview says this can be used without requiring the account to hold POL for gas. |
CLOB market WebSocketwss://ws-subscriptions-clob.polymarket.com/ws/market |
Receive public order-book, price, and market-lifecycle updates. | Use when the bot needs an ongoing market-data stream rather than periodic REST reads. |
CLOB user WebSocketwss://ws-subscriptions-clob.polymarket.com/ws/user |
Receive account order and trade updates. | Authenticated stream. |
RTDSwss://ws-live-data.polymarket.com |
Receive public reference prices, comments, and trade activity. | Its listed data is distinct from CLOB order-book updates. |
Sports WebSocketwss://sports-api.polymarket.com/ws |
Receive public live-game status and scores. | Sports-specific stream. |
These roles and endpoints are described in Polymarket’s API overview. For a basic bot that can tolerate periodic reads, REST may be enough. A bot that needs to react to book changes or account order and trade events can use the corresponding documented stream; the docs do not publish latency guarantees.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsHow do events, markets, outcomes, and token IDs fit together?
The documented hierarchy is event → market → outcome. An event can group one or more markets. A market is a tradable question with YES and NO outcomes, and each outcome has its own token ID. The event slug, market condition ID, and outcome token ID are not interchangeable.
#1 Best Overall
- Use Gamma to find an event relevant to the bot.
- Inspect the event’s markets and select the specific market the bot will evaluate.
- Choose the outcome—YES or NO—and retain that outcome’s token ID.
- Use the selected token ID for the relevant price or order-book request, stream subscription, and order workflow.
Market metadata can include status, trading constraints, fees, and other properties. Read the fields relevant to the chosen market instead of assuming all markets share identical settings. Polymarket’s market-data overview describes the discovery model and selection flow.
How do Polymarket CLOB authentication and order signing work?
Public market-data reads and private trading requests have different requirements. The API documentation demonstrates listing active markets from Gamma without authentication. Private CLOB requests use a two-layer credential flow, and placing an order also involves a wallet signature.
Rank #2
1. L1 wallet proof establishes control
The wallet signs EIP-712 typed data to establish control of a Polygon address and create or derive CLOB API credentials. The documented example includes the signer address, a Unix timestamp, a nonce, and a control-attestation message.
Free tools Windows power users keep installed
One-click scans. No signup required.
2. L2 credentials authenticate private requests
Private CLOB requests are authenticated with the API credential secret using HMAC-SHA256. The API key identifies the credential, the secret signs requests, and the passphrase is sent in a request header.
Rank #3
3. An order also needs a wallet signature
Order placement uses L2 request authentication as well as a wallet signature authorizing the order. An API key alone is not the order signature. Keep private keys and API secrets out of source control and logs as a basic security practice. Polymarket documents the authentication flow in its API guide.
Should you use an SDK or call the APIs directly?
Polymarket describes its official SDKs as providing a typed interface and handling common concerns such as pagination, errors, and wallet setup. Direct API calls make sense when the runtime lacks SDK support, a bot needs closer control of request signing, headers, retries, or transport, or an endpoint or wire format is not exposed by the SDK.
Rank #4
| Choice | Good fit when | Trade-off to consider |
|---|---|---|
| Official SDK | The runtime is supported and the bot benefits from a typed client and common request-handling features. | Confirm that the SDK exposes the endpoint and behavior the bot needs. |
| Direct API calls | The runtime is unsupported, the integration needs fine-grained transport or signing control, or a needed endpoint is not covered. | The application must implement the relevant request details itself, including authentication and error handling. |
The documentation does not establish that direct calls are inherently faster or that using an SDK is always safer. Check the API overview for current SDK and direct-integration guidance.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →When should a bot poll, and when should it use WebSockets?
Polling makes a request when the bot’s schedule or decision logic calls for one. A WebSocket maintains a stream for updates of the documented type. The choice is about the bot’s data needs and implementation, not a published latency guarantee.
Best Value
| Approach | Use it when | Relevant Polymarket surface |
|---|---|---|
| REST polling | Periodic snapshots are sufficient for the bot’s workflow. | Gamma for discovery and metadata; CLOB for prices and books; Data API for positions and activity. |
| Market stream | The bot needs ongoing public book, price, or market-lifecycle updates. | CLOB market WebSocket. |
| Account stream | The bot needs account order and trade updates as events arrive. | Authenticated CLOB user WebSocket. |
| Other live data | The bot needs the public data types listed for those services. | RTDS for reference prices, comments, and trade activity; Sports WebSocket for game status and scores. |
Polymarket lists these streams and their update types in its API documentation. A stream’s documented purpose does not by itself promise a particular delivery latency or guarantee that it replaces REST reads for every workflow.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What does the first-order workflow look like?
Polymarket’s quickstart has TypeScript and Python examples using Polymarket clients. The examples retrieve a market by slug, select the YES outcome token ID, submit a market buy, wait for asynchronous on-chain settlement, and then query positions. Treat these as documented examples, not as a guarantee about every market or an endorsement of a strategy.
- Discover: Find an event or market through Gamma or the quickstart’s market lookup flow.
- Select: Identify the specific market and outcome; carry forward the outcome token ID rather than confusing it with the event slug or condition ID.
- Observe: Read the relevant CLOB price or order book, or subscribe to the market stream if the bot needs ongoing updates.
- Decide: Apply the bot’s own decision logic. The API documentation does not establish that a particular strategy is profitable or effective.
- Submit: Authenticate the private request and submit an order authorized by a wallet signature.
- Reconcile: Check order and trade updates, allow for settlement, then verify the resulting position through the appropriate account data path.
The quickstart says that unfilled market-order quantity is canceled rather than left open, and distinguishes a match from subsequent asynchronous settlement. A match response should therefore not be treated as proof that the final settled position is already visible. The tutorial recommends having at least 10 pUSD available to follow its example; that is tutorial guidance, not a general minimum or investment recommendation. See Place Your First Order for the example flow.
What should a developer verify before connecting a live bot?
- Check the selected market’s current status, fees, and trading constraints in its metadata.
- Use the token ID for the chosen outcome in price, book, and order operations.
- Keep public market reads distinct from authenticated account operations and protect wallet keys and API secrets.
- Design order reconciliation around the difference between matching and asynchronous settlement.
- Recheck current API and SDK documentation before implementation; endpoint details, SDK coverage, authentication requirements, collateral labels, market constraints, and program terms can change.
- Evaluate jurisdictional access, legal eligibility, and strategy suitability separately; the API documentation cited here does not settle those questions.
Polymarket’s documentation also surfaces a Builder Program, but the API pages cited here do not establish current enrollment status, eligibility, or commercial terms.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




