meshapi.app / guides / kalshi-api
Kalshi API Quickstart: Keys, Market Data, and Event Context
Get a Kalshi API key and pull live market data, 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 · Kalshi setupGet a key and your first market data
Kalshi is a CFTC-regulated exchange for event contracts, binary markets that pay $1 if the event happens. Reading market data doesn't require any authentication; trading does. The short version:
- Create a Kalshi account and complete verification at kalshi.com.
- Generate an API key under Account → Settings → API. You get a key ID and download an RSA private key; trading requests are signed with it.
- Skip both for now if you just want data: market endpoints are public.
Your first call, no key required: every open market on the exchange, sorted by activity.
# pip install requests
import requests
BASE = "https://api.elections.kalshi.com/trade-api/v2"
markets = requests.get(f"{BASE}/markets", params={"status": "open", "limit": 100}).json()["markets"]
for m in sorted(markets, key=lambda m: float(m["volume_fp"]), reverse=True)[:10]:
print(f'{m["ticker"]:30} yes=${m["yes_bid_dollars"]} vol={float(m["volume_fp"]):,.0f}')The API quotes prices as dollar decimals: a yes_bid_dollars of "0.6400" is an implied 64% probability (the website displays the same price as 64¢). Setup done. The interesting question is what to point it at.
Part 2 · The marketsMention markets: trading on what someone will say
Kalshi's mention markets resolve on whether a person or company says a specific word or phrase during a defined event, such as a press conference or an earnings call. They are among the most active categories on the exchange:

Open one and it trades like any other order-book market. The underlying is a phrase. This is the Walmart earnings-call market the day before the call:

How these markets resolve, and where the API stops
Scroll to the market rules and you find the detail that matters for anyone trading these programmatically:

The ground truth for a mention market is a transcript, and the Kalshi API does not have it. You get prices, orderbooks, and the final YES/NO, but nothing about the event itself: you cannot check what was actually said against how the market is pricing it. Settled markets also age out of the API after a retention window of roughly ten weeks, taking the price path and its context with them unless someone archived both.
Part 3 · Event contextAdding the transcript layer with Mesh
Mesh is the missing half of the workflow: cleaned, timestamped transcripts of the events these markets resolve on (press conferences, hearings, earnings calls), with speaker resolution and topic tagging, queryable over REST. The same loop as Part 1, now with the ground truth attached:
# 1. Kalshi: how is the market pricing "Competition / Competitor"?
mkt = requests.get(f"{BASE}/markets", params={"series_ticker": "KXEARNINGSMENTIONWMT"}).json()
# 2. Mesh: what has Walmart actually said in past calls?
segs = requests.get(
"https://api.meshapi.app/v1/segments/search",
params={"q": "competition", "event_type": "earnings_call", "limit": 100},
headers={"X-API-Key": "YOUR_KEY"},
).json()["data"]
print(f"'competition' spoken in {len({s['event_id'] for s in segs})} earnings calls")
for s in segs[:3]:
print(s["event_title"], "|", s["speaker_name"], "->", s["sentence_txt"][:60])That base rate, how often the phrase actually comes up and who says it, is what the market's price is guessing at. The historical transcripts turn a vibes trade into a frequency estimate. Mesh events also carry the matching Kalshi ticker (this Walmart call is linked to KXEARNINGSMENTIONWMT), so joining prices to transcripts is a lookup, not a fuzzy match.
Combining mention markets with company financial markets
The rules screenshot above hinted at the bigger pattern: Kalshi prices what companies do as well as what they say. Walmart's mention market shares a page with markets on its comparable-sales growth, and SpaceX has markets on its launch cadence:

These two market types are natural pairs, and the event context is the bridge between them:
- Language moves the operational markets. When an executive says "we're accelerating launch cadence" on a call, the launch-count contracts reprice. You can search every past call for the phrase and see what actually followed.
- Operations move the mention markets. A launch failure mid-month makes "will they mention the anomaly?" tradeable, and the record of how the company addressed past incidents is the edge.
- When a mention contract spikes, the first question is whether something got said. Timestamped segments answer it without scrubbing through a two-hour video.
Kalshi 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 Kalshi and Polymarket both.
FAQ
Is the Kalshi API free?+
Reading market data is free and needs no account. Trading through the API requires a funded Kalshi account and signed requests; the API itself has no separate fee, but exchange fees apply to fills.
How do Kalshi mention markets resolve?+
On the official video and transcripts of the named event, per each market's rules. The exact phrase or its plural/possessive counts; other grammatical inflections do not. The API reports the outcome, not the evidence, so verifying against what was said requires the event transcript.
Can I get historical data for settled Kalshi markets?+
Only partially. Settled markets age out of the exchange API after a retention window of roughly ten weeks, so long-run backtests need an archive captured while markets were live. This is one of the gaps Mesh's historical data covers.
Does Kalshi have a WebSocket API?+
Yes: streaming orderbook and trade updates for subscribed tickers, which beats polling for live strategies. REST remains the interface for orders and account data.
Does this work for Polymarket too?+
Yes. Polymarket runs mention-style markets on many of the same events, including the same earnings calls, and Mesh's transcripts are venue-agnostic. The Polymarket quickstart covers that exchange's Gamma and CLOB APIs.
Screenshots are live Kalshi markets captured in August 2026. Also see the Polymarket API quickstart.