Polymarket API Starter Kit: Pull Markets, Prices & Order Books with AI (2026)

Polymarket US Read-only

Verified working on live data in read-only mode, Nov 18, 2026. Public market data only: a 5-loop watch of the top 10 two-sided markets plus markets, search, bbo and book on Nov 18, 2026. No API key was created, so balance and positions were never called; the request signing was checked offline against the official SDK on Oct 25.

Short answer: The Polymarket US API has two hosts: public market data at https://gateway.polymarket.us (no API key needed, e.g. GET /v1/markets and GET /v1/markets/{slug}/book) and authenticated trading at https://api.polymarket.us. This recipe gives you a prompt that has your AI coding tool build a read-only Python toolkit for markets, best bid/ask and order books, plus optional balance and position reads. It places no orders.

What are the key facts?

  • Polymarket US has two hosts: public data at https://gateway.polymarket.us (no key) and authenticated trading at https://api.polymarket.us.
  • Key public endpoints: GET /v1/markets, GET /v1/market/slug/{slug}, GET /v1/markets/{slug}/book, GET /v1/markets/{slug}/bbo, GET /v1/events, GET /v1/search. Since Oct 15, 2026, the events list carries only each event's primary market; fetch GET /v1/events/{id} or the event slug for all of its markets.
  • Official SDKs: pip install polymarket-us (Python 3.10+) or npm install polymarket-us (Node 18+).
  • API keys need a verified Polymarket US account, created at polymarket.us/developer. Requests are signed with Ed25519 using X-PM-Access-Key, X-PM-Timestamp, X-PM-Signature headers.
  • The docs say 25 requests/second per IP, but the public gateway sits behind Cloudflare, which returned HTTP 429 to us after about 5 requests at 1 per second. The 429 is an HTML page with Retry-After: 10. Poll at one request every 2 seconds and honor Retry-After.
  • /v1/markets order is arbitrary unless you pass orderBy=volume&orderDirection=desc, and a market's question is often generic ("World Series Champion"). The side you're pricing is in title.
  • Taker fees are Θ × contracts × p × (1 − p), rounded to the cent half-to-even. From Nov 21 to Dec 31, 2026, taker trades placed through the API pay Θ 0.0695 at any volume, and Polymarket rebates 70% of those fees. App trades use volume tiers, raised at 9:45 PM ET on Nov 25, 2026: 0.11 under $10,000 of 30-day taker volume, 0.10 to $50,000, 0.09 to $250,000, 0.0695 at $250,000+. The markets' feeCoefficient field shows the app base tier (0.095 on Nov 18; 0.11 on Nov 27).
  • International Polymarket's Gamma API (https://gamma-api.polymarket.com) is public too, but the international exchange is close-only for US users. Read-only there.
DifficultyBeginner
Time30–45 min
Cost$0 (public data is free)
Works withClaude Code, Cursor, ChatGPT / Codex, Grok

What will you build?

A small, tidy Python toolkit that lists Polymarket US markets, prints best bid/ask and the order book for any market slug, and (optionally) reads your own balance and positions with your API key. No orders.

Who is it for?

Anyone who searched "polymarket api" and wants working code in minutes, and anyone planning a bot who needs a clean data layer first.

Not for: Placing orders. That's the next recipe, in paper mode.

The details

This is the starting point for anything on Polymarket US: public prices and order books with no key, and a signed read of your own balance once you have one. It never places an order.

What we found rebuilding it on Nov 18, 2026

We built the Oct 25 prompt again in a clean folder and ran it against the live gateway (09:22 to 09:31 ET). The Oct 25 fixes held: 60 quotes over 3 watch loops of the top 20 with no errors, a 404 slug gave one error line and exit 1, and balance with no key printed "no key set". Three things were off:

  • The fee in bbo used an old assumption. The prompt said feeCoefficient is 0.0695 on most markets. Every market we pulled now returns 0.095. Under the current fee schedule, the taker Θ is your own tier, set by trailing 30-day taker volume: 0.095 under $10,000, 0.085 to $50,000, 0.075 to $250,000 and 0.0695 above, with 0.0695 for a new account's first 7 days. The old build printed one number with no hint that it depends on you, and rounded with plain floats while the exchange rounds half-to-even. bbo now shows the base-tier and top-tier fee, and PM_TAKER_THETA sets your own.
  • search nfl printed 351 markets. limit counts events, not markets, and one "Top WR Fantasy Football Week 11" event alone holds 35. Search results also carry no prices. Search now prints each event's market count and its first 5 markets. Unlike Oct 25, search nfl returned no resolved markets this time; the filter stays as a guard.
  • The busiest markets aren't all tradable both ways. 6 of the top 20 by volume were one-sided: five "by date" ladders (GTA VI release, Anthropic IPO) at a 0.99 bid with no ask, plus a Super Bowl long shot with only a 0.01 ask. markets --two-sided skips them, and watch uses it.

The Cloudflare limit is still there at one call every 2 seconds: 3 rate-limit waits in 60 quote calls in the old build's run, then exactly one 11-second wait per 10-market loop in the new one. Nothing crashed. If you need faster data, this public gateway isn't the place to get it.

The new build, watch --n 10 --loops 5 --interval 60 (Nov 18, 09:26–09:31 ET, trimmed):

  two-sided bid 0.190 (19.0%)  ask 0.200 (20.0%)  mlaec-isrpol-pm-2026-10-27-bennet
  two-sided bid 0.150 (15.0%)  ask 0.160 (16.0%)  tec-nfl-champ-2027-02-14-w-saners
  two-sided bid 0.590 (59.0%)  ask 0.600 (60.0%)  mlaec-isrpol-pm-2026-10-27-gadeiz
[14:27:15 UTC] loop 1: 10 two-sided, 0 one-sided, 0 errors, 1 rate-limit waits (11 s)
...
[14:31:13 UTC] loop 5: 10 two-sided, 0 one-sided, 0 errors, 1 rate-limit waits (11 s)

That's 50 quotes and no errors. Not one quote moved in five minutes on a Wednesday morning, which is normal for futures.

bbo with the new fee lines, then with your own tier set:

$ python cli.py bbo tec-nfl-champ-2027-02-14-w-saners
tec-nfl-champ-2027-02-14-w-saners  state=MARKET_STATE_OPEN
  bid:  0.150 (15.0%)
  ask:  0.160 (16.0%)
  NO:   0.850 (85.0%)  (= 1 - best bid; to buy NO you sell YES)
  last trade: 0.160 (16.0%)
  taker fee, 100 @ ask: $1.28 base tier (theta 0.095), $0.93 top tier (0.0695)
$ PM_TAKER_THETA=0.085 python cli.py bbo tec-nfl-champ-2027-02-14-w-saners
  ...
  taker fee, 100 @ ask: $1.14 (your theta 0.085)

Update, Nov 23, 2026: from 12:01 AM ET on Nov 21, 2026 through Dec 31, 2026, Polymarket US charges every taker trade placed through the API Θ = 0.0695, no matter your volume, and rebates 70% of those fees on straight trades (fee docs). The tiers above still apply to trades placed in the app. 100 contracts at $0.50 through the API: $1.74 charged, $1.22 rebated. The prompts below now default to 0.0695 for API orders; the Nov 18 run output above is unchanged.

Update, Nov 27, 2026: Polymarket US raised its app and website taker tiers at 9:45 PM ET on Wednesday, Nov 25, 2026: Θ is now 0.11 under $10,000 of trailing 30-day taker volume, 0.10 to $50,000, 0.09 to $250,000 and 0.0695 above (it was 0.095, 0.085, 0.075 and 0.0695) (fee docs). The API rate is unchanged: 0.0695 at any volume with 70% rebated, through Dec 31, 2026. The prompts below use the new tiers. The Nov 18 run output above is unchanged and shows the old 0.095 base tier; at 0.11 the same 100 @ $0.16 app fee is $1.48 (0.11 × 100 × 0.16 × 0.84 = 1.4784).

Built this before Nov 18? Paste this follow-up prompt into the same project:

Update my Polymarket US starter:
1. Fees: taker fee = theta x contracts x p x (1 - p), rounded to the cent
   with banker's rounding (Decimal, ROUND_HALF_EVEN). API taker trades
   (Nov 21 to Dec 31, 2026): theta 0.0695 at any volume, and Polymarket
   rebates 70% of those fees. App trades use tiers: 0.11 under $10k
   trailing 30-day taker volume, 0.10 to $50k, 0.09 to $250k, 0.0695
   above. Default theta 0.0695 (API). The market's feeCoefficient reads
   the app base tier (0.11 since Nov 25, 2026). In bbo show the fee for 100 at the ask at
   0.0695 ("API") with the 70% rebate and the net, and at feeCoefficient
   ("app base tier"); env PM_TAKER_THETA overrides theta.
2. search: default limit=10. limit counts events, not markets, and one
   prop event can hold 30+ markets. Print each event's market count, at
   most --per-event (default 5) markets, then "... and N more".
3. markets --two-sided: fetch 3x N, keep rows with both a bid and an ask,
   trim to N. Print bid/ask with 3 decimals. watch uses two-sided markets.
Add mocked tests: 0.11 x 100 x 0.5 x 0.5 -> $2.75, 0.0695 -> $1.74,
search per-event cap, --two-sided filter. Run them. Still no orders.

What happened when we first rebuilt it, Oct 25, 2026

On Oct 25, 2026 we pasted the earlier version of this prompt into a clean folder, built it, and ran it against the live gateway. The endpoints, field names, the bids/offers book shape and the null-quote handling all held. The Ed25519 signing matched the official polymarket-us SDK byte for byte on random keys. These problems were real, and the prompt above is fixed for them:

  • It got rate limited far below 25 req/s, then crashed. The old prompt said to stay under 25 req/s, and the build throttled itself to 10. The gateway sits behind Cloudflare and answered with HTTP 429 after a handful of calls. In a controlled test at one request per second on one book, 5 calls went through, then 10 seconds of 429s, then 7 more, then 10 seconds of 429s again. The 429 is an HTML page, not JSON, with a Retry-After: 10 header. The old 1 s, 2 s, 4 s backoff gave up before those 10 seconds were over. A 69-market check took 14 minutes for one pass (13:22 to 13:36 ET) and lost 28 of 138 CLI calls to HTTPError: 429. Our box is a cloud server, and Cloudflare may treat home connections more gently. Still, the docs' 25 req/s figure isn't what a script polling the public gateway gets. The toolkit now spaces calls 2 seconds apart, sleeps for Retry-After plus one second, and turns a final 429 into one clear error line. The WebSocket isn't an escape hatch here: wss://api.polymarket.us/v1/ws/markets needs an API key.
  • markets printed rows you couldn't tell apart. It showed slug plus question, and the question is the event, not the side. On a 6,100-market crawl, 115 markets shared "Regular Season Scrimmage TDs Leader", and the first 20 rows were "World Series Champion" and "Major League Soccer Champion" futures in no useful order. Now it sorts with orderBy=volume&orderDirection=desc (the docs don't list sort values, so we tested them). It prints title (the side, like "Milwaukee Brewers") and bid/ask, and drops markets whose status isn't open. The active=true&closed=false list still contained one resolved market.
  • Search returns finished events. search nfl led with September games whose markets had all resolved. In the old build's pass (10 listed markets plus the first two events from four searches), 20 of the 46 markets we could check were MARKET_STATE_EXPIRED with no bids. Search now hides resolved markets and says how many it hid. Game moneylines have no title at all, so it prints their outcomes ("Buccaneers / Bears").
  • Smaller fixes. The book has stats.lastTradePx but no currentPx, so every book row the old build logged had a null price. Errors now print one line and exit 1 instead of a traceback. bbo shows the NO price (1 minus best bid) and the taker fee from the market's own feeCoefficient, using the fee page's formula: Θ × contracts × p × (1 − p).

The rebuilt version, watch --n 20 --loops 6 --interval 60 (Oct 25, 13:42–13:51 ET, trimmed):

  two-sided bid 0.900 (90.0%)  ask 0.901 (90.1%)  Democratic Party         paccc-usho-midterms-2026-11-03-dem
  two-sided bid 0.160 (16.0%)  ask 0.170 (17.0%)  American League          tec-mlb-wsleague-2026-11-01-w-al
  two-sided bid 0.360 (36.0%)  ask 0.370 (37.0%)  Ken Paxton (R)           ewc-usse-tx-2026-11-03-rep
  two-sided bid 0.833 (83.3%)  ask 0.837 (83.7%)  Milwaukee Brewers        tec-mlb-champ-2026-09-27-mil
[17:43:19 UTC] loop 1: 20 two-sided, 0 one-sided, 0 errors, 0 rate-limit waits (0 s)
[17:44:58 UTC] loop 2: 20 two-sided, 0 one-sided, 0 errors, 0 rate-limit waits (0 s)
[17:46:47 UTC] loop 3: 20 two-sided, 0 one-sided, 0 errors, 1 rate-limit waits (11 s)
...
[17:51:41 UTC] loop 6: 20 two-sided, 0 one-sided, 0 errors, 0 rate-limit waits (0 s)

That's 120 quotes and no errors. Even at one call every 2 seconds, Cloudflare pushed back once. The toolkit waited 11 seconds and carried on. On a Sunday afternoon the top 20 were all election and World Series markets, and only the Brewers quote moved (ask 0.837 to 0.834). A quiet watch is normal.

bbo on the top market, then a slug that doesn't exist (Oct 25; the fee line used the 0.0695 coefficient markets returned then):

paccc-usho-midterms-2026-11-03-dem  state=MARKET_STATE_OPEN
  bid:  0.900 (90.0%)
  ask:  0.901 (90.1%)
  NO:   0.100 (10.0%)  (= 1 - best bid; to buy NO you sell YES)
  last trade: 0.901 (90.1%)
  taker fee, 100 @ ask: $0.62 (coef 0.0695)
$ python cli.py book no-such-market-xyz
ERROR: HTTP 404 from /v1/markets/no-such-market-xyz/book: '{"code":5,"message":"The server was unable to process your request.","details":[]}'

Built this before Oct 25? Paste this follow-up prompt into the same project:

Update my Polymarket US starter:
1. _get: one shared throttle, one call every 2 s (env PM_MIN_INTERVAL).
   On 429 (an HTML page from Cloudflare, not JSON) sleep Retry-After + 1
   (10 if missing), retry up to 4 times, then raise PMError. Retry 5xx and
   timeouts too. Never call .json() on a non-200.
2. list_markets: add orderBy=volume&orderDirection=desc and drop markets
   whose status isn't MARKET_STATUS_OPEN.
3. Print each market's title (the side) next to the slug; for moneylines
   with no title, print the outcomes. markets shows bid/ask from
   bestBidQuote/bestAskQuote.
4. search: limit=20, hide markets that aren't MARKET_STATUS_OPEN unless
   --all, and print how many were hidden.
5. The book has stats.lastTradePx, not currentPx: log that instead. Sort
   bids and offers yourself before taking the best.
6. bbo: show NO = 1 - best bid and the taker fee for 100 contracts at the
   ask: feeCoefficient x 100 x p x (1 - p).
7. Add `watch [--n 10] [--loops 1] [--interval 60]` with one line per
   market and a "[HH:MM:SS UTC] loop N: ... errors, W rate-limit waits"
   summary, flush=True; one market's error never stops the loop.
8. The CLI catches PMError, prints one line and exits 1.
Add mocked tests for each change and run them. Still no order placement.

What prompt do you paste into your AI coding tool?

Works in Claude Code, Cursor, Codex/ChatGPT, Grok or any agent that can write files. Paste it into an empty folder. Read what it builds before you run anything.

You are building a READ-ONLY Python toolkit for the Polymarket US API.
Use only endpoints documented at https://docs.polymarket.us. If you are not
sure an endpoint or field exists, stop and tell me instead of guessing.

Project: polymarket-starter/
- Python 3.10+, `requests`, `python-dotenv`, `cryptography` (Ed25519 for
  auth.py), `pytest`.
- pm.py, one requests.Session, one PMError exception class:
  - _get(path, params): ONE shared throttle for every call, default one
    request every 2 seconds (MIN_INTERVAL = 2.0, overridable by env
    PM_MIN_INTERVAL). The public gateway sits behind Cloudflare and
    answers bursts with HTTP 429 long before 25 req/s: the 429 body is an
    HTML page, not JSON, and carries a Retry-After header in seconds
    (often 10). On 429, sleep Retry-After + 1 (or 10 if missing), retry
    up to 4 times, then raise PMError("rate limited ..."). Never call
    .json() on a 429 or any non-200; raise PMError with the status and the
    first 120 characters of the body. Timeout 15 s; retry 5xx and timeouts
    the same way.
  - list_markets(limit=20) -> GET https://gateway.polymarket.us/v1/markets
      ?active=true&closed=false&orderBy=volume&orderDirection=desc&limit=N
      Without orderBy the order is arbitrary (long-dated futures first).
      Drop any market whose status is not MARKET_STATUS_OPEN: the list can
      still contain resolved markets.
  - get_market(slug) -> GET /v1/market/slug/{slug}, cached 5 minutes.
  - get_bbo(slug)    -> GET /v1/markets/{slug}/bbo (fields under marketData:
      bestBid, bestAsk, currentPx, lastTradePx, state, ...).
  - get_book(slug)   -> GET /v1/markets/{slug}/book. Bids are
      marketData.bids, asks are marketData.offers (no "asks" key), levels are
      {px: {value}, qty}. Sort bids high-to-low and offers low-to-high
      yourself before taking the best; either side can be empty.
      The book has stats.lastTradePx but no currentPx.
  - search(query, limit=10) -> GET /v1/search?query=...&limit=N. Response is
      {"events": [...]}, each event holds markets. limit counts EVENTS, not
      markets: one fantasy or player-prop event can hold 20-40 markets, so
      limit=20 can return 350+ markets. Search markets carry no quotes
      (bestBidQuote/bestAskQuote are null). Keep only markets whose status
      is MARKET_STATUS_OPEN unless all=True.
- Every market is a YES contract on one side. The market "question" is
  often generic (hundreds share "World Series Champion" or "Regular Season
  Scrimmage TDs Leader"); the side you are pricing is in "title"
  (e.g. "Milwaukee Brewers"). Always print title next to the slug. Game
  moneylines have no title: print their outcomes list instead.
- Prices are decimals 0.00-1.00 on the YES side; show implied % next to
  them, and show NO as 1 - best bid (to buy NO you sell YES).
- Fees (docs.polymarket.us/fees): taker fee = theta x contracts x p x
  (1 - p), rounded to the cent with banker's rounding (round half to
  even; use Decimal, not float round). Taker trades placed through the
  API from 12:01 AM ET Nov 21, 2026 through Dec 31, 2026 pay theta 0.0695
  at any volume, and Polymarket rebates 70% of those fees on straight
  trades. App trades use tiers by trailing 30-day taker volume: 0.11
  under $10k, 0.10 to $50k, 0.09 to $250k, 0.0695 above. Default theta
  0.0695 (API). The market's feeCoefficient field shows the app base tier
  (0.11 since Nov 25, 2026); read and log it. In `bbo` show the taker fee for 100 contracts
  at the best ask at 0.0695, labelled "API", with the 70% rebate and the
  net, plus the feeCoefficient figure labelled "app base tier"; env
  PM_TAKER_THETA overrides theta.
- Append every quote you fetch (ts UTC, slug, best bid, best ask, last
  trade, source "bbo"/"book") as one JSON line to logs/market_data.jsonl.
- cli.py:
  - `markets [--n 20] [--two-sided]`: one line each: slug, title, question
    (trimmed), bid, ask (3 decimals). Read bid/ask from the list's
    bestBidQuote/bestAskQuote; "-" when missing. Many top-volume markets
    are one-sided 0.99 "by date" ladders; --two-sided keeps only rows with
    both a bid and an ask (fetch 3x N and trim to N).
  - `bbo <slug>`, `book <slug> [--depth 10]`, `search "<text>" [--all]
    [--per-event 5]` (event title and market count, then up to per-event
    markets' slug and title, then "... and N more"; say how many resolved
    markets were hidden).
  - `watch [--n 10] [--loops 1] [--interval 60]`: top N two-sided markets,
    each loop calls bbo for each, prints one line per market and
    "[HH:MM:SS UTC] loop L: X two-sided, Y one-sided, Z errors, W rate-limit
    waits (S s)". flush=True. An error on one market never stops the loop.
  - `balance` and `positions` only when auth.py has keys; without keys print
    "no key set" and exit 0.
  - Always print marketData.state. Null bestBid/bestAsk prints "no bid" /
    "no ask". Catch PMError: print one line, exit 1, no traceback.
- OPTIONAL auth.py (only if POLYMARKET_KEY_ID and POLYMARKET_SECRET_KEY are
  set): read-only GET https://api.polymarket.us/v1/account/balances and
  GET https://api.polymarket.us/v1/portfolio/positions, signed exactly as
  the Authentication page describes (Ed25519 over timestamp+METHOD+path,
  path without query string; headers X-PM-Access-Key, X-PM-Timestamp in ms,
  X-PM-Signature base64).
- Never implement order placement in this project.
- Secrets: keys only from environment variables. .env.example with empty
  placeholders, .env in .gitignore, never print keys.
- README with setup steps and 3 example commands.
- pytest tests with mocked HTTP (no live calls): list_markets sends
  active=true, closed=false, orderBy=volume and drops non-OPEN markets;
  an HTML 429 with Retry-After is slept on and retried, and 5 in a row
  raise PMError; search hides resolved markets and caps markets per event;
  unsorted and one-sided books; the fee formula with banker's rounding
  (0.11 x 100 x 0.5 x 0.5 = 2.75 -> $2.75; 0.0695 x 100 x 0.5 x 0.5 =
  1.7375 -> $1.74, 70% API rebate -> $1.22; 0.11 x 100 x 0.05 x 0.95 =
  0.5225 -> $0.52);
  --two-sided drops one-sided rows; watch survives one market erroring.

Before writing code, show me the file plan. After writing it, tell me exactly
which commands to run.

How do you build it, step by step?

  1. Make an empty folder (for example polymarket-starter) and open it in your AI coding tool. Drop the Safety Pack rules file and .gitignore in first.
  2. Paste the prompt. Approve the file plan, then let it write the code. Skim pm.py and make sure every URL starts with https://gateway.polymarket.us/v1/ or https://api.polymarket.us/v1/.
  3. Install and run with no key:
    python -m venv .venv && source .venv/bin/activate
    pip install requests python-dotenv cryptography pytest
    python cli.py markets --n 20
    python cli.py search "temperature"
    
    markets lists the busiest open markets first, one side per row: slug, the side (title, like "Milwaukee Brewers"), the event question, bid and ask. Search results come grouped by event, with resolved markets hidden and at most 5 markets per event (--per-event 20 for more). Calls are spaced 2 seconds apart, so a 20-row command takes a moment.
  4. Pick an open slug from the output and try python cli.py bbo <slug> and python cli.py book <slug>. The book response lists bids under marketData.bids and asks under marketData.offers (not asks). The bbo response nests prices under marketData (for example bestBid.value, bestAsk.value, currentPx.value). If state is MARKET_STATE_EXPIRED or the bid and ask are null, the market is finished; pick another.
  5. Know the price convention. On Polymarket US, price.value always refers to the long (YES) side. To trade the NO side at price X you set price.value = 1.00 - X. Your toolkit should label this clearly so a future bot doesn't get it backwards.
  6. Watch a few markets. python cli.py watch --n 10 --loops 5 --interval 60 prints one line per market and a summary per loop, including how many times it had to wait out a 429. Expect most quotes to sit still unless a game or a vote is live.
  7. (Optional) Add your key for read-only account data. Create a key at polymarket.us/developer after identity verification. The secret is shown once. Put both values in .env, never in code, then run python cli.py balance and python cli.py positions.
  8. Run the tests with pytest. They should pass without internet.
  9. (Optional) International data, read-only. The Gamma API at https://gamma-api.polymarket.com/markets?closed=false&limit=5 is public. Only use it for research. US users can't open positions on the international exchange, so don't build trading on it. For the international CLOB order book, fees and auth, see the Polymarket CLOB API Starter.

How do you test it in paper or demo mode first?

This recipe never places orders, so it's "paper" by design. Two habits to build now, because the next recipes depend on them:

  • Log every response you'd use for a trading decision (timestamp, slug, best bid/ask) to logs/market_data.jsonl. When you build the bot, the paper ledger replays against this.
  • Keep auth separate. Public data code should run with no key at all. If your toolkit crashes without POLYMARKET_KEY_ID, fix that, because it means keys are leaking into code paths that don't need them.

For auth, order types, book shapes and rate limits next to Kalshi's, see the Kalshi vs Polymarket API comparison.

When you're ready to simulate orders, go to Build a Polymarket Bot with Claude Code (Paper Mode).

What safety checks does it need before real money?

Tick every box before the bot touches real money. The full rules file, .gitignore and pre-commit hook are in the Safety Pack.

Which official docs did we check?

Endpoints and rules were checked against these pages on Nov 27, 2026. APIs change, so if something here disagrees with the official docs, trust the docs and tell us.

Frequently asked questions

Does the Polymarket API need an API key?

Not for market data. Polymarket US public endpoints at https://gateway.polymarket.us (markets, events, order books, best bid/offer, search) need no key. You only need a key for trading, positions and balances on https://api.polymarket.us.

What's the difference between the Polymarket API and the Polymarket US API?

Polymarket US is a separate, CFTC-regulated, USD-based exchange for US residents with its own API (docs.polymarket.us). International Polymarket is crypto-based, with its own Gamma, CLOB and Data APIs (docs.polymarket.com), and it's close-only for the United States.

How do I get a Polymarket US API key?

Create an account in the Polymarket US app, complete identity verification, then sign in at polymarket.us/developer with the same login method and create a key. You get a Key ID and a Secret Key, and the secret is shown only once.

What is the Polymarket US API rate limit?

The docs say 25 requests per second, shared across most endpoints and enforced per source IP, with a few RFQ endpoints at 1 per second. In our Oct 25, 2026 test from a cloud server, the public gateway's Cloudflare layer returned 429 after about 5 requests at 1 per second, with an HTML body and Retry-After: 10. One call every 2 seconds ran 10 minutes with a single 11-second wait. On Nov 18 it was one 11-second wait about every 10 calls. Plan for that, and read Retry-After rather than guessing.

What does a Polymarket US trade cost in fees?

Takers pay Θ × contracts × p × (1 − p), rounded to the cent half-to-even. From 12:01 AM ET on Nov 21, 2026 through Dec 31, 2026, taker trades placed through the API pay Θ = 0.0695 at any volume, and Polymarket rebates 70% of those fees: 100 contracts at $0.50 cost $1.74, with $1.22 rebated. In the app, Θ is your tier by trailing 30-day taker volume: 0.11 under $10,000, 0.10 to $50,000, 0.09 to $250,000 and 0.0695 at $250,000 or more (raised at 9:45 PM ET on Nov 25, 2026). Makers pay nothing, and high-volume makers get a rebate. See the fee calculator.

Is there an official Python library?

Yes. pip install polymarket-us (Python 3.10+), and there's a TypeScript SDK at npm install polymarket-us (Node 18+). Both handle request signing.

More from the kitchen: Recipes by platform · Kalshi & Polymarket fee calculator · How we verify recipes · Safety Pack