meshapi.app / guides / polymarket-api

Polymarket API Quickstart: Keys, Market Data, and Event Context

Pull live Polymarket data with nothing but an HTTP client, then go where the exchange API stops: checking what was actually said in the events these markets trade on.

Updated August 2026 · 12 min read

Part 1 · Polymarket setupRead market data with no key at all

Polymarket runs its markets as tokenized contracts on Polygon, settled in USDC, with a central limit order book. Two public APIs cover reading:

  1. The Gamma API (gamma-api.polymarket.com) serves market metadata, outcomes, and prices. No key, no wallet.
  2. The CLOB API (clob.polymarket.com) serves orderbooks, price history, and trading. Reading is open; placing orders requires signing with a Polygon wallet key, and the py-clob-client library derives the API credentials from it.

Your first call: the most active markets on the exchange right now.

# pip install requests
import requests, json

resp = requests.get("https://gamma-api.polymarket.com/markets", params={
    "active": "true", "closed": "false",
    "order": "volume24hr", "ascending": "false", "limit": 10,
})
for m in resp.json():
    yes = json.loads(m["outcomePrices"])[0]  # prices arrive as a JSON-encoded string
    print(f'{m["question"][:52]:54} yes={yes}  vol24h=${float(m["volume24hr"]):,.0f}')

Prices are decimals between 0 and 1: a yes price of 0.43 is an implied 43% probability. (Kalshi's API quotes the same idea as dollar-decimal strings; if you build cross-venue, normalize early.) Setup done. The interesting question is what to point it at.

Part 2 · The marketsMention polymarkets: trading on what someone will say

Polymarket's mention markets resolve on whether a word or phrase gets said during a defined event. The catalog runs from politics to earnings calls to MrBeast videos:

Polymarket mention markets list: what will be said during Big Brother, Walmart's earnings call, White House remarks, the All-In Podcast, and MrBeast's next video
Live mention polymarkets. The same event class Kalshi trades, with a Polymarket twist: many contracts are frequency thresholds ("Customer 40+ times", "AI 50+ times") rather than a single yes/no mention.

Open the Walmart earnings-call event and the threshold structure is the whole game. The market is not asking whether Walmart says "customer". It is asking how many times:

Polymarket market page for 'What will Walmart say during their next earnings call?' with frequency-threshold contracts: Customer 40+ times at 68%, China/India 8+ times at 43%
"What will Walmart say during their next earnings call?" on Polymarket. Customer 40+ times trades at 68%, China / India 8+ times at 43%, Marketplace / Market Place at 99%. Pricing these means estimating word frequencies, not just topics.

How these markets resolve, and where the API stops

The rules are strict about the trigger and say nothing about the evidence. Resolution is "Yes" if the listed term is mentioned by anyone during the event; disputed outcomes go through the UMA optimistic oracle, where whoever proposes or disputes a resolution needs the receipts. Scroll down any mention market and you can watch traders doing this by hand:

Polymarket rules for the Walmart mention market, resolving Yes if the listed term is mentioned during the event, with trader comments disputing the count
Rules and a live dispute. The market resolves on what was said, and the comment section is traders counting by hand: "International was said 23 times…", "International was said 20+ times, this should be disputed. Its a yes." The evidence layer is missing from the platform.

That comment thread is the wall, stated by the users themselves. The Polymarket APIs give you prices, orderbooks, and per-token price history, but nothing about the event: no transcript, no counts, no way to check a threshold contract against what was actually said. Deeper history is thin too. Price series survive per token, but trade-level and orderbook history are not archived by the platform, and the event context behind a settled market was never there to begin with.

Part 3 · Event contextAdding the transcript layer with Mesh

Mesh carries the missing evidence: cleaned, timestamped transcripts of the events these markets resolve on (press conferences, hearings, earnings calls), with speaker resolution and topic tagging, queryable over REST. For a frequency-threshold market, the workflow is literally counting:

# 1. Polymarket: the "Customer 40+ times" contract is at 0.68

# 2. Mesh: how often has Walmart actually said "customer" per call?
import requests
from collections import Counter

segs = requests.get(
    "https://api.meshapi.app/v1/segments/search",
    params={"q": "customer", "event_type": "earnings_call", "limit": 200},
    headers={"X-API-Key": "YOUR_KEY"},
).json()["data"]

per_call = Counter(s["event_title"] for s in segs)
for event, n in sorted(per_call.items()):
    print(f"{event}: 'customer' said {n} times")

If the phrase cleared 40 in six of the last eight calls, 68% is cheap; if it cleared 40 twice, 68% is a gift to the other side. The comment-section traders are reconstructing this base rate manually from videos. The transcripts make it a query.

Combining mention markets with company financial markets

Polymarket also prices what companies do. The same search that finds the Walmart mention market finds launch-cadence markets for SpaceX:

Polymarket market: How many SpaceX launches in August 2026? with threshold contracts, 15 launches at 44% and 13 at 31%, with price history chart
"How many SpaceX launches in August 2026?" Threshold contracts again: 15 at 44%, 13 at 31%. The company that gets talked about in speeches and earnings calls has its output priced two clicks away.

Say-markets and do-markets feed each other, and the event record is the bridge:

Polymarket prices the bet; the event decides it. Mesh gives you the event: transcripts with speakers and timestamps, going back through settled markets, through one API, for Polymarket and Kalshi both.

FAQ

Is the Polymarket API free?+

Reading is free: the Gamma and CLOB data endpoints need no key or account. Trading requires a funded account (USDC on Polygon, or the US app where available) and wallet-signed requests. The API itself has no fee.

How do Polymarket mention markets resolve?+

"Yes" if the listed term is mentioned by anyone during the defined event, per each market's rules; frequency contracts require the stated count. Contested outcomes go through the UMA optimistic oracle, where proposers and disputers back their claim with evidence from the event itself.

Can I get historical Polymarket data?+

Price history per token is available from the CLOB API. Trade-level and orderbook history are not archived by the platform, and the event context behind settled markets never was. Long-run research needs an external archive; this is one of the gaps Mesh's historical data covers.

Does Polymarket have a WebSocket API?+

Yes: the CLOB exposes a streaming feed for orderbook and trade updates on subscribed markets, which beats polling for live strategies. REST remains the interface for order placement.

Does this work for Kalshi too?+

Yes. Kalshi runs mention markets on many of the same events, including the same earnings calls, and Mesh's transcripts are venue-agnostic. The Kalshi quickstart covers that exchange's REST API and auth.

Screenshots are live Polymarket markets captured in August 2026. Also see the Kalshi API quickstart.