> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spidra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Polymarket

> Get Polymarket events, markets, live odds, order books, price history, leaderboards and trader positions as structured data, from polymarket.com and Polymarket US, and line the same markets up against Kalshi.

Every Polymarket page you can open in a browser has numbers behind it: the odds on each outcome, the bid and ask, volume, who holds what. Send the page's link with `"output": "json"` and you get those numbers as fields, with prices as they stand at the time of the request. You don't need a Polymarket account. Each link costs 1 credit, and big lists cost a little more ([credits](#credits)).

## Example

```json theme={null}
{ "urls": ["https://polymarket.com/event/democratic-presidential-nominee-2028"], "output": "json", "wait": true }
```

The item's `result`, shortened to one market:

```json theme={null}
{
  "type": "event",
  "venue": "polymarket",
  "title": "Democratic Presidential Nominee 2028",
  "category": "Elections",
  "status": "open",
  "endDate": "2028-11-08T04:59:00.000Z",
  "volume": 1307210733.660441,
  "volume24h": 2336785.655158,
  "liquidity": 59649960.93932,
  "marketCount": 54,
  "leadingOutcome": { "name": "Jon Ossoff", "probability": 27.05 },
  "markets": [
    {
      "outcomeLabel": "Gavin Newsom",
      "question": "Will Gavin Newsom win the 2028 Democratic presidential nomination?",
      "status": "open",
      "probability": 14.85,
      "bestBid": 0.148,
      "bestAsk": 0.149,
      "volume": 28147344.894752,
      "outcomes": [
        { "name": "Yes", "price": 0.1485, "probability": 14.85, "bestBid": 0.148, "bestAsk": 0.149, "midpoint": 0.1485, "priceSource": "clob" },
        "..."
      ]
    }
  ]
}
```

A price runs from 0 to 1 and is the market's implied chance, so `0.1485` and `"probability": 14.85` say the same thing. `priceSource: "clob"` means the price came from the live order book. The full result also has open interest, each market's rules, resolution state, fees and token IDs, Polymarket's own summary of the event in `marketContext`, and related events.

## Links that work

| Link | Example | You get |
| - | - | - |
| Event | `polymarket.com/event/<slug>` | Every market in the event, as above. Add `?includeOrderBook=true` for each outcome's book |
| Market | `/event/<slug>/<market>`, `/market/<slug>` | One market with its order book |
| Category | `/`, `/new`, `/politics`, `/crypto/bitcoin`, `/predictions/<tag>` | The page's events in the page's order, with their markets |
| Search | `/search?q=fed+rates` | Matching events and their markets, with `totalResults` |
| Sports | `/sports/nfl/games`, `/sports/live`, `/sports/<league>/<game>` | Games with teams, score, period and each market's line |
| Leaderboard | `/leaderboard/<category>/<period>/<profit or volume>` | Ranked traders with profit and volume. `?tab=biggest-wins` gives the biggest single wins |
| Trader | `/profile/<wallet>`, `/@<name>` | Name, joined date, markets traded, profile views, biggest win, portfolio value, profit split into its parts, and open positions |
| Trader tabs | `?tab=positions`, `?tab=activity`, `?tab=pnl` on a trader link | Positions (`&status=closed` for closed ones), trades, or profit over time |
| Event tabs | `?tab=activity`, `?tab=holders`, `?tab=orderbook`, `?tab=comments` on an event or market link | Its trades, top holders, order book or comments |
| Price history | `?range=1w` on an event or market link | Price points for each market. Ranges go from `1h` to `1y` or `all`, or set `from` and `to` dates |
| Other pages | `/activity?minUsd=10000`, `/breaking`, `/rewards`, `/combos`, `/perps` | Big trades across all markets, the biggest movers, reward markets, combo markets, perpetuals |

Links in other languages (`polymarket.com/de/...`) work too. Account, deposit and trading pages aren't read as data.

## A list of markets

A category page lists events. Add `view=markets` to get one row per market instead, and `_s` to sort it the way Polymarket's own pages do: `volume_24hr`, `volume`, `liquidity`, `start_date:desc`, `end_date:asc` (ending soon), `competitive` or `closed_time:desc`. `_sts=resolved` lists resolved markets, and `count` sets how many rows you want.

```json theme={null}
{ "urls": ["https://polymarket.com/politics?view=markets&_s=volume&count=5"], "output": "json", "wait": true }
```

The first of the five rows, shortened:

```json theme={null}
{
  "eventTitle": "Will the U.S. invade Iran before 2027?",
  "question": "Will the U.S. invade Iran before 2027?",
  "status": "open",
  "leadingOutcome": "No",
  "leadingProbability": 86.5,
  "yesPrice": 0.135,
  "change1dPoints": -4,
  "volume": 77467507.62221402,
  "liquidity": 328840.3373,
  "endDate": "2027-01-01T04:59:00.000Z",
  "conditionId": "0x5db999fad322cea2914535aae5517060c3f80ad6d8c0231cde2124a434d16846"
}
```

`change1dPoints` is the 24-hour move in percentage points. The `conditionId` also appears in price history, trade and position results, so you can join them.

## Polymarket US

Polymarket US (`polymarket.us`) is a separate exchange with its own markets and prices. Its event, game, category (`/category/politics`), sports, search, price history and order book links work the same way, and prices come back in `USD`. A game link also takes `?tab=stats` for the box score and player stats, or `?tab=play-by-play` for every play. Polymarket US doesn't publish trader data or the volume and liquidity of its lists, so its leaderboard and profile links fail free and those fields are `null`.

## Compare with Polymarket US and Kalshi

Add `compare=polymarket-us,kalshi` to a category or search link and Spidra finds the same questions on each venue and puts their prices side by side:

```json theme={null}
{ "urls": ["https://polymarket.com/search?q=fed%20december&compare=polymarket-us,kalshi"], "output": "json", "wait": true }
```

That search matched 15 pairs, five for each pair of venues. One of them, shortened:

```json theme={null}
{
  "question": "Will the Fed increase interest rates by 50+ bps after the December 2026 meeting?",
  "pairLabel": "Polymarket vs Polymarket US",
  "polymarketBid": 0.012,
  "polymarketAsk": 0.013,
  "polymarketUsBid": 0.02,
  "polymarketUsAsk": 0.03,
  "gapPoints": -1.25,
  "buyYesOn": "Polymarket",
  "buyNoOn": "Polymarket US",
  "fees": 0.002,
  "netEdge": 0.005,
  "sizeAtPrice": 6726.65,
  "matchConfidence": 0.95,
  "matchNotes": ["Close times differ by 14 days.", "Same Fed meeting and the same move."]
}
```

`netEdge` is what's left after buying Yes on one venue, No on the other, and paying both taker fees. Read `matchNotes` before you act on a gap: these two markets settle on the same Fed meeting but close 14 days apart.

## Credits

* Each link is 1 credit.
* Lists, trades, positions, holders, comments and leaderboards include 100 rows in that credit, and each further 100 rows is 1 more. A leaderboard link with `count=250` cost 3 credits.
* Price history and profit over time include 1,000 points, and each further 1,000 is 1 more.
* A compare link costs 1 credit for each venue it reads. The example above read three, so it cost 3.

A link that finds nothing is free: a market that doesn't exist, a search or filter with no results, a compare with no matching pairs, or a Polymarket US trader page.

## Limits

* Prices are what Polymarket shows at the moment of the request, which `fetchedAt` records.
* On a big event, the 50 busiest open markets get live order book prices. The rest show `"priceSource": "gamma"` and can be a few minutes behind, as can market lists.
* Polymarket US prices can be up to 30 seconds old.
* Polymarket doesn't allow trading from the US and some other countries. That rule is about trading, so reading market data isn't affected.

## Templates

[Templates](https://docs.spidra.io/templates.md) cover the common Polymarket jobs, such as event odds, odds history, order books, top traders and their portfolios, big trades, markets ending soon and sports odds, plus Polymarket US reports and price gaps between Polymarket, Polymarket US and Kalshi.

> [!NOTE]
>
> Check Polymarket's terms before you collect data from it. You're responsible for how you use what you collect.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.