> ## 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.

# Kalshi

> Get Kalshi events, markets, live odds, order books, trades, price history, weather brackets, leaderboards and trader profiles as structured data, and line the same markets up against Polymarket.

A Kalshi market is a set of yes or no contracts, and each one trades at a price that works as the market's odds. Send any Kalshi link with `"output": "json"` and those numbers come back as fields: the odds on each outcome, bid and ask with their sizes, the last trade, volume, open interest and the rules it settles on. Prices are live at the time of the request, and you don't need a Kalshi account. Each link costs 1 credit, and big lists cost a little more ([credits](#credits)).

## Example

```json theme={null}
{ "urls": ["https://kalshi.com/markets/kxnba/pro-basketball-champion/kxnba-27"], "output": "json", "wait": true }
```

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

```json theme={null}
{
  "type": "event",
  "venue": "kalshi",
  "ticker": "KXNBA-27",
  "title": "2027 Pro Basketball Champion",
  "category": "Sports",
  "status": "open",
  "currency": "USD",
  "volumeUnit": "contracts",
  "volume": 58945781.42,
  "openInterest": 45864149.91,
  "marketCount": 30,
  "leadingOutcome": { "name": "San Antonio", "probability": 22.5, "marketTicker": "KXNBA-27-SAS" },
  "summary": "San Antonio leads at 22.5%.",
  "markets": [
    {
      "ticker": "KXNBA-27-SAS",
      "question": "Will San Antonio win the 2027 Pro Basketball Finals?",
      "outcomeLabel": "San Antonio",
      "probability": 22.5,
      "bestBid": 0.22,
      "bestAsk": 0.23,
      "bestBidSize": 52367.47,
      "bestAskSize": 218707.3,
      "lastTradePrice": 0.22,
      "change1dPoints": -1,
      "volume": 1611205.96,
      "openInterest": 1169528.05,
      "expectedExpiration": "2027-07-31T14:00:00.000Z"
    }
  ]
}
```

A price runs from 0 to 1 and is the market's implied chance, so a bid of `0.22` is 22 cents a contract. Kalshi counts volume in contracts, which `volumeUnit` says on every result. Each market also has its full rules, strike, settlement sources, tick size, the taker fee per contract and, once it settles, the result. The event has links to Kalshi's rulebook and contract terms.

## Links that work

| Link | Example | You get |
| - | - | - |
| Event | `kalshi.com/markets/<series>/<slug>/<event>` | Every market in the event, as above. Sports events add the game: teams, start time, live score and clock. Add `?includeOrderBook=true` for each market's book |
| Market | An event link with `?market=<ticker>`, or `/markets/<ticker>` | One market with its order book. Archived markets work too |
| Series | `/markets/<series>` | The recurring series (its rulebook, fees and lifetime volume) and its open events |
| Past results | A series or event link with `?tab=past-results` | Every settled round and what won |
| Weather | `/weather/<city>?type=high&date=<date>` | The day's temperature brackets with odds, the result, the weather station and the live reading |
| Event tabs | `?tab=orderbook`, `?tab=trades`, `?tab=activity` on an event or market link | Its order book, trades, or recent activity |
| Price history | `?range=1w` on an event or market link | Price points for each market. Ranges go from `1h` to `1y`, or set `from` |
| Category | `/category/<category>`, `/sports/<league>`, `/tag/<tag>` | The page's events in Kalshi's own order |
| Browse | `/browse?sort=volume` | Events sorted by `trending`, `newest`, `closing`, `movers` or `volume`. Add `&status=settled` for settled ones |
| Search | `/search?q=fed` | Matching events. `&profiles=true` searches traders instead |
| Activity | `/activity` | Public trades across all markets, with the trader's nickname when they share it |
| Trader | `/ideas/profiles/<nickname>` | Followers, joined date, profit, volume, markets traded, profit by category and badges. `?tab=trades` and `?tab=posts` for their trades and posts |
| Leaderboard | `/social/leaderboard?metric=profit&timeframe=weekly` | Ranked traders. `metric` is `profit`, `volume` or `predictions`, and `category` narrows it |
| Ideas | `/ideas/feed`, `/ideas/posts/<id>` | Posts from Kalshi's Ideas feed, or one post |

Spidra reads these from Kalshi's public market data, so the slug in a link doesn't matter, only the tickers do. Strike ladders often have many rungs nobody trades. Add `activeOnly=true` to a category, browse or search link to drop them.

## Leaderboards

```json theme={null}
{ "urls": ["https://kalshi.com/social/leaderboard?metric=profit&timeframe=weekly"], "output": "json", "wait": true }
```

The first row:

```json theme={null}
{ "rank": 1, "nickname": "lostzemblan", "value": 966960.3, "isAnonymous": false, "profileUrl": "https://kalshi.com/ideas/profiles/lostzemblan", "metric": "profit", "period": "weekly" }
```

`valueUnit` on the result says what `value` is: dollars for profit, contracts for volume.

## Compare with Polymarket

Add `compare=polymarket,polymarket-us` to a category, browse or search link, and Spidra finds the same questions on each venue and puts their prices side by side, with the gap that's left after both venues' fees. It works the same way as [comparing from Polymarket](https://docs.spidra.io/sites/polymarket.md#compare-with-polymarket-us-and-kalshi). A search for `fed` matched 18 pairs and cost 3 credits, 1 for each venue it read.

## Credits

* Each link is 1 credit.
* Lists include 100 events in that credit, and trades, posts and leaderboards include 100 rows. Each further 100 is 1 more.
* Price history includes 1,000 points, and each further 1,000 is 1 more.
* A compare link costs 1 credit for each venue it reads. The matching is free.

A link that finds nothing is free: a market that doesn't exist, a search with no results, or a trader who keeps their trades private.

## Limits

* Prices are what Kalshi shows at the moment of the request, which `fetchedAt` records.
* Kalshi's leaderboard stops at 100 ranks.
* A trader's open positions are only shown to signed-in Kalshi users, so trader results don't include them.

## Templates

[Templates](https://docs.spidra.io/templates.md) cover the common Kalshi jobs, such as election odds, sports odds, weather markets, markets closing soon, odds history, big trades and the leaderboard, plus a prediction market arbitrage finder that works across Kalshi and Polymarket.

> [!NOTE]
>
> Check Kalshi'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.