PPrime Minister of Israel after the next election? ·…47%▲20PIsraeli Legislative Election Winner · Likud>99%▲73PFed Decision in October? · No change96%▲2PNets vs. Celtics10%—PTrail Blazers vs. Lakers · Luka Dončić: Points O/U…98%—PPistons vs. Knicks · Karl-Anthony Towns: Points O/U 19.578%—PIsrael Election: Likud # of seats? · 25-2995%▲76KPrime Minister of Israel after the 2026 election? ·…62%—KPro Baseball Champion · Milwaukee90%▼6KWhich party will win the U.S. House? · Democratic…91%—PMilwaukee Brewers vs. Tampa Bay Rays · Extra Innings>99%▲88K2026 Midterms: Congress Balance of Power? · Democrats sweep63%▼1PMLB World Series Champion 2026 · Milwaukee Brewers92%▼5KTexas Senate winner? · James Talarico66%—PBalance of Power: 2026 Midterms · Democrats Sweep66%—PWhat price will Bitcoin hit in October? · ↓…71%—PDelaware vs. Western Kentucky50%▲2PPresidential Election Winner 2028 · JD Vance18%▼1PPan Pacific Open: Kamilla Rakhimova vs Ekaterina Alexandrova ·…>99%—KTexas Governor winner? · Greg Abbott67%▼2PWhich party will win the Senate in 2026? ·…67%▲1PUS-Iran ceasefire continues through...? · October 3195%▲3KPro Baseball Championship Series MVP Winner · Jackson Chourio42%▲2PNext French Presidential Election · Marine Le Pen43%—

Polymarket API guide

Gamma, CLOB, Data API and WebSockets: base URLs, working requests and how trading authentication works.

Polymarket publishes its market data through free public APIs, and lets you trade programmatically through its order book (the CLOB). Reading prices, markets and leaderboards needs no account at all; placing orders needs a funded Polymarket wallet and API credentials. This guide maps out the APIs, shows working requests, and explains authentication, based on Polymarket’s documentation as of October 2026.

The APIs at a glance

API Base URL Use it for Auth
Gamma https://gamma-api.polymarket.com Discovering events and markets, metadata, prices None
CLOB https://clob.polymarket.com Order books, prices, placing and cancelling orders Reads: none · trading: L2 + signature
Data https://data-api.polymarket.com Positions, trades, activity, leaderboards None for public data
Relayer https://relayer-v2.polymarket.com Gasless wallet transactions Relayer API key
Market WebSocket wss://ws-subscriptions-clob.polymarket.com/ws/market Live order book and price updates None
User WebSocket wss://ws-subscriptions-clob.polymarket.com/ws/user Your own order and trade updates Required
Live data (RTDS) wss://ws-live-data.polymarket.com Reference prices, comments, trade activity None
Sports wss://sports-api.polymarket.com/ws Live game status and scores None

Reading markets with the Gamma API

The quickest way to see what’s trading. This returns the five open events with the most volume in the last 24 hours:

curl "https://gamma-api.polymarket.com/events?active=true&closed=false&order=volume24hr&ascending=false&limit=5"

Each event contains its markets. For every market, outcomePrices is a JSON-encoded string such as ["0.62", "0.38"]: the first value is the Yes price, which is also the implied probability. Multi-candidate events, like an election with many candidates, contain one yes/no market per candidate, named in groupItemTitle. Useful fields include volume24hr, oneDayPriceChange, endDate and closed.

To fetch one event by its numeric id:

curl "https://gamma-api.polymarket.com/events/12345"

Leaderboards and activity with the Data API

curl "https://data-api.polymarket.com/v1/leaderboard?timePeriod=MONTH&orderBy=PNL&limit=25"

timePeriod takes DAY, WEEK, MONTH or ALL; orderBy takes PNL or VOL; an optional category narrows it to POLITICS, SPORTS or CRYPTO. See it running in our live Polymarket leaderboard. The older lb-api.polymarket.com service has been retired.

Order books and live prices

The CLOB serves prices and order books without authentication, and the market WebSocket pushes updates as they happen, which is better than polling if you need real-time data. Subscribe with the token IDs of the outcomes you care about (found in each market’s clobTokenIds on Gamma).

Trading: how authentication works

Placing orders uses two levels of authentication:

  1. L1, proving you own the wallet. Your signer key signs an EIP-712 message (ClobAuth, on Polygon, chain ID 137) that attests you control the address.
  2. L2, API credentials. Send that signature to POST /auth/api-key to create an API key, secret and passphrase, or GET /auth/derive-api-key to recover existing ones. Every private request is then signed with HMAC-SHA256 using the secret, and sent with POLY_API_KEY, POLY_PASSPHRASE, POLY_SIGNATURE, POLY_TIMESTAMP and POLY_ADDRESS headers.

Orders themselves are also signed by the wallet. Polymarket supports several wallet types: Deposit Wallets (the default for accounts created since May 4, 2026), older proxy wallets created by email or Google sign-in, Safe wallets created with MetaMask-style signers, and allowlisted plain wallets (EOAs), which pay their own gas in POL.

Rules and limits

  • Geographic restrictions apply to the API too. Countries that are close-only or blocked on Polymarket, including the US for the main exchange, are restricted on the trading API as well. See Is Polymarket legal? Polymarket US has its own separate documentation.
  • Rate limits depend on your tier. Heavier users can join Polymarket’s Builder Program for higher limits.
  • Fees apply to taker orders in most categories; makers pay nothing. See the fee table in our Polymarket profile.

FAQ

Is the Polymarket API free?
Yes. Reading market data, order books and leaderboards is free and needs no account. Trading costs the normal trading fees.
Do I need an API key to get Polymarket prices?
No. The Gamma, Data and CLOB read endpoints are public. You only need credentials to trade or to stream your own account’s orders.
Can I trade on Polymarket from the US via the API?
Not on the main exchange: the US is restricted on both the website and the API. Americans should use Polymarket US and its own documentation.
Does Kalshi have an API too?
Yes. Kalshi offers a public REST API for market data and signed-key trading. See our Kalshi API guide, which also compares the two.

Related: Prediction market APIs compared · Kalshi API guide · Polymarket leaderboard · Polymarket review