Polymarket API in Python: 3 Requests, No API Key Needed
A standard-library Python script reads one Polymarket market, the order book for one outcome and the fee that market charges, in three public requests with no key. Read this way, 309 of the 1,000 most-traded open markets charged takers nothing on 20 September 2026.
Most-traded open markets that charged takers nothing
0309of 1,000
Each market's own fee fields, read on 20 September 2026
- Sports markets at a 0.03 rate, not the published 0.05
- 065
- Same read; markets listed September 2025 to July 2026
- Public requests for one saved snapshot
- 03
- The market, one outcome's order book and one research table, with no key or account
Three requests and no key: what the Polymarket API gives you
Polymarket's market data is public. Three requests return one market's identity and outcome prices, the full order book for one outcome and the fee that market charges a taker, with no API key and no account. Read that way on 20 September 2026, 309 of the 1,000 most-traded open markets charged takers nothing, and 65 sports markets reported a rate of 0.03 where Polymarket's published sports rate is 0.05. The full table is on the Polymarket fee calculator.
Two services do the work. Gamma describes a market: its question, its outcomes, the token ID behind each outcome, whether it is open and what it charges. CLOB is the exchange: it returns the bids and asks for one token at one moment. A price from Gamma is a summary; only the order book says what can be bought or sold, and how much of it.
Download the Python script or open the notebook. Python 3.10 or later is enough, because the script uses only the standard library. It places no orders and never retries on its own. A second script, polymarket_fee_survey.py, repeats the fee count above over as many markets as you ask for.
| Service | Ask it for | What comes back |
|---|---|---|
| Gamma, gamma-api.polymarket.com | One market, by its exact slug | Market and condition IDs, labelled outcomes with their token IDs, a summary price per outcome, open or closed, and the market's own fee settings |
| CLOB, clob.polymarket.com | One order book, by an outcome's token ID | Every bid and ask with its size, and the time the book was produced |
| Vultax research exports | One published table, by article and dataset ID | A historical table with its observation window, population, sources and a version that changes only when the table does |
Download table figures:CSVJSON with sources
Run it in two commands
A market is addressed by its slug, the last part of its address on polymarket.com. The first command lists the most-traded open markets with their slugs and what each charges. The second saves a snapshot of one of them. You can paste a whole polymarket.com address after --slug instead; the script keeps the last segment.
On Windows, replace python3 with py. The script writes a new folder each time and refuses to overwrite an existing one, so an earlier snapshot is never lost. Open the token IDs in outcomes.csv as text: they are more than 70 digits long, and a spreadsheet that reads them as numbers silently changes them.
python3 polymarket_snapshot.py --list 10
python3 polymarket_snapshot.py --slug another-fed-rate-hike-in-2026Another Fed rate hike in 2026?
Yes Gamma price 0.865
No Gamma price 0.135
Order book for 'Yes': bid 0.86 (100 shares), ask 0.87 (3,846 shares), spread 0.01; book time 2026-09-20T20:57:45.725000+00:00
Taker fee for 100 shares at the 0.87 ask: $0.5655 (this market's rate is 0.05; an estimate, not a quote)
Research table: 5 rows, 7,178 wallets, kept separate from this market
Saved snapshot.json, outcomes.csv and research.csv to polymarket-exampleMatch the outcome before you read a price
Gamma returns outcomes, prices and token IDs as three separate lists, and each list arrives as a string of JSON inside the JSON. The script parses all three, checks that they are the same length and only then pairs them by position. If the lengths differ it stops, because a guess here attaches one outcome's price to another.
The first outcome is not always Yes: a sports market lists two team names. The script reads the book for the first outcome under its real label; add --outcome No, or a team name, to choose another. A label that does not match exactly one outcome is refused and the valid labels are printed.
Three identifiers are easy to confuse. The market ID names the listing in Gamma. The condition ID names the question on-chain. The token ID names one outcome of that question, and it is what CLOB's order book is keyed on. The script checks that the book it receives carries both the token it asked for and the market's condition ID before it keeps a single price.
{
"question": "Another Fed rate hike in 2026?",
"conditionId": "0x9b1a03b4…9e73b114",
"outcomes": "[\"Yes\", \"No\"]",
"outcomePrices": "[\"0.865\", \"0.135\"]",
"clobTokenIds": "[\"8349889393…8777625\", \"5169973159…7696963\"]"
}A listed price is not a quote you can trade
Gamma's price for an outcome is a summary. What can actually be bought is the lowest ask in the book and the size resting at it, and what can be sold is the highest bid. The script finds both by value, because the order of levels in the reply is not a promise, and reports a spread only when both sides exist.
One-sided books are normal. The run below is a settled NFL game read the same evening: the winner has bids at 99.9 cents and nobody left selling. The best ask and the spread are missing, and the script says so instead of writing zero. A zero there would read as a free share.
The book's own timestamp, Gamma's update time and the time of each request are kept as separate fields in snapshot.json. The requests run one after another, so the file describes three nearby moments and is not a single instant. A visible ask and its size do not guarantee a later fill.
Packers vs. Jets
Packers Gamma price 0.9995
Jets Gamma price 0.0005
Order book for 'Packers': bid 0.999 (1,073,704 shares), no asks, no spread without both sides; book time 2026-09-20T20:57:48.973000+00:00
Taker fee for 100 shares: $0 (this market's rate is 0)
Research table: 5 rows, 7,178 wallets, kept separate from this market
Saved snapshot.json, outcomes.csv and research.csv to onesidedRead the fee the market actually charges
Every market's Gamma record carries its own fee settings. feesEnabled says whether a trading fee applies at all. feeSchedule.rate is the coefficient in Polymarket's formula, fee = shares × rate × price × (1 − price), which only the taker pays. Every market in our read reported an exponent of 1, the published curve; the script estimates nothing for any other value.
The record matters because the category does not settle the question. Polymarket publishes 0.05 for sports, yet on 20 September 2026 the day's NFL game markets carried a rate of 0 and season-long winner markets carried 0.03. The script prints the taker fee for 100 shares at the best ask from the market's own rate, and snapshot.json includes a link that opens the fee calculator on the same numbers.
{
"feesEnabled": true,
"feeType": "economics_fees",
"feeSchedule": {
"exponent": 1,
"rate": 0.05,
"takerOnly": true,
"rebateRate": 0.25
}
}def taker_fee(shares, price, rate):
"""Polymarket's published formula, rounded once to five decimal places."""
return round(shares * rate * price * (1 - price) + 1e-12, 5)
taker_fee(100, 0.87, 0.05) # 0.5655Add research without inventing a join
The third request downloads the activity table from our Polymarket trader study: the share of wallets in profit by how many trades they closed, across 7,178 wallets in July 2026. It is saved as research.csv beside the market files and is never merged into them. It describes a historical population, not the market you selected.
The export carries its article address, section, observation window, population, sources and a content version. The version changes only when the published table changes, so a stored copy can be checked against the page later. Cite the article and its window when you use a figure.
Research access lists every format: Markdown for each study, CSV and JSON for each table and chart, and read-only tools for AI assistants. These are published research. They are not account data, a complete trade history or an order-routing API.
When it stops, it says why
Every failure ends in one line that names the cause. Nothing is saved on an error, and a request that failed is never repeated automatically.
| What you see | Why | What to do |
|---|---|---|
| '…' is an event with 4 markets, not one market | The slug names an event, which groups several markets | Pass one of the market slugs the message lists |
| No market has the exact slug '…' | A typing slip, or the market has been removed | Run --list 10 and copy a slug from the output |
| --outcome 'Maybe' does not name exactly one outcome | The label is not one of this market's outcomes | Use one of the labels the message prints |
| Order book: unavailable | The market is closed or not accepting orders, or the reply failed an identity check | Read the reason stored under receipts in snapshot.json |
| HTTP 429 from the address requested | Requests are arriving too quickly | Wait, for as long as the message says when it gives a time, before running it again |
| Output directory already exists | A folder of that name is already there | Pass a new --output path |
Download table figures:CSVJSON with sources
error: 'fed-decision-in-october' is an event with 4 markets, not one market. Pass one of its market slugs:
fed-decreases-interest-rates-by-50-bps-after-october-2025-meeting
fed-decreases-interest-rates-by-25-bps-after-october-2025-meeting
no-change-in-fed-interest-rates-after-october-2025-meeting
fed-increases-interest-rates-by-25-bps-after-october-2025-meetingWhat to build next
A good first project is a dated watchlist. Keep the exact market and token IDs, run the snapshot on a schedule and compare the same token with itself over time. Record a run that failed as a gap. A missing hour drawn as a flat line is the most common way a home-made price history goes wrong.
For more than a handful of markets, read Polymarket's pagination and real-time documentation before raising the request rate, and checkpoint what has been saved so a restart does not begin again from nothing. The Vultax terminal does this continuously across the venue; the script is for the question you want to own end to end.
Downloads contain the published study figures. Changing market widgets are separate. Use Vultax research with an AI assistant. Press note.
Questions this page answers
- Does the Polymarket API need an API key?
- Not for market data. Gamma's market records and CLOB's order books are public, and the example script reads both without a key, a wallet or an account. Placing or cancelling orders is different: that requires authenticating with a wallet, and the script does neither.
- What is the difference between Polymarket's Gamma API and CLOB API?
- Gamma describes markets: the question, its outcomes, their token IDs, summary prices, status and fee settings. CLOB is the exchange: it returns the order book, with every bid and ask, for one outcome's token ID. Use Gamma to find and identify a market and CLOB to see what can be traded.
- How do I find a Polymarket market's token ID?
- Request the market from Gamma by its slug and read clobTokenIds, a JSON-encoded list in the same order as outcomes. Pair the two lists by position after checking they are the same length. Keep token IDs as text: they are more than 70 digits long and lose precision as numbers.
- Why is the best bid, best ask or spread missing for a Polymarket market?
- Because one side of the book is empty. It is common just before and after a market settles, when nobody will sell a near-certain winner or bid for a loser. A missing side is unknown, not zero, and a spread exists only when both sides do.
- How do I read a Polymarket market's fee from the API?
- Read feesEnabled and feeSchedule on the market's Gamma record. If feesEnabled is not true, or feeSchedule.rate is 0, a taker pays nothing. Otherwise the taker fee is shares × rate × price × (1 − price). On 20 September 2026 the rate was 0, 0.03, 0.04, 0.05 or 0.07 across the 1,000 most-traded open markets.
Sources and evidence
- Polymarket: market data overview
Events, markets, outcomes and token IDs; checked 20 September 2026 UTC.
- Polymarket: discover markets
Official market discovery and pagination reference.
- Polymarket: market details
Outcome identity, market state and the fee fields feesEnabled and feeSchedule.
- Polymarket: prices and order books
Official order-book reference.
- Polymarket: fees
The taker fee formula, published category rates and five-decimal rounding; checked 20 September 2026 UTC.
- Vultax: fee settings of the 1,000 most-traded open markets
One read on 20 September 2026 at 20:53 UTC, with CSV, JSON and the script that produced it.
- Vultax trader research and published data
A separate historical research population, not a join to the selected market.
A teaching example built on public data: it does not trade, and provider responses can change without notice. Not financial advice.
Watch this measurement live in Vultax.
Every open market with its price, volume and source time, kept current so you do not have to poll for it.
New studies, by email.
Measured, sourced, and sent once per study. No digests, no promotions.
Continue reading
Polymarket and Kalshi Order Book Depth: 10,000 Contracts Fit 64% and 57% of Books
Vultax walked the displayed asks in 10,282 order-book snapshots at three order sizes. 100 contracts fit almost every book. 10,000 fit 64% of Polymarket books at a median 0.25¢ above the best ask, and 57% of Kalshi books at 15.38¢ above it.
Crypto Exchange Feed Latency and Coverage: 16 Venues Measured
Order-book feed latency on 16 crypto exchanges: medians from 35.0 ms (Coinbase) to 111.5 ms (BTSE), a 95th percentile of 288–590 ms on every venue, and data in every minute of the day. Plus the coverage check that catches a feed that stays connected and stores almost nothing.
Crypto Wash Trading and Real Liquidity: Fake-Volume Estimates Run From 51% to 95%
Published estimates put fake or non-economic bitcoin volume at 51% to 95%, and above 70% on unregulated venues. Why the studies disagree, why depth and slippage judge a venue better than volume (Binance: 64.3% of volume, 30.7% of depth, per Kaiko), and what to check yourself.