# Kalshi Markets Scraper: Live Odds, Weather & Price History (`peccarvalho/kalshi-markets`) Actor

Live odds for every Kalshi prediction market from the official public API: prices, implied probability, volume, open interest, order books, settled results, 144 weather series and price history. No login, no proxies.

- **URL**: https://apify.com/peccarvalho/kalshi-markets.md
- **Developed by:** [Pedro Carvalho](https://apify.com/peccarvalho) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 market returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Kalshi Markets Scraper: Live Odds, Weather Markets & Price History

Get **live odds for any Kalshi prediction market** as clean JSON, CSV or Excel. It covers elections, economics (Fed rates, CPI, jobs), crypto (Bitcoin, Ethereum), sports, weather, AI, companies and more.

Data comes from **Kalshi's official public API**. There's no login, no API key, no browser and no proxies, which is why runs are fast (usually a few seconds) and don't break when the website changes.

### What you get

For every market:

| Field | Example |
|---|---|
| `ticker`, `eventTicker`, `seriesTicker` | `KXHIGHNY-26SEP28-T71` |
| `category` | `Climate and Weather` |
| `eventTitle`, `marketTitle` | "Highest temperature in NYC on Sep 28?", "72° or above" |
| `impliedProbability` | `0.44`: the mid of the best bid and ask, or the last price if there's no quote |
| `yesBid`, `yesAsk`, `noBid`, `noAsk`, `lastPrice`, `spread` | prices in dollars (0–1) |
| `volume`, `volume24h`, `openInterest`, `liquidityDollars` | contracts and dollars |
| `openTime`, `closeTime`, `expirationTime` | ISO timestamps |
| `status`, `result` | `finalized`, `yes` / `no` for settled markets |
| `url` | a link to the market on kalshi.com |

**Optional extras:**

- **Price history** (`priceHistory`): 1-minute, hourly or daily candles with close, high, low, bid, ask, volume and open interest, going back up to 365 days.
- **Order book** (`orderbook`): yes and no price levels with sizes, up to 100 levels deep.
- **Settlement rules** (`rulesPrimary`, `rulesSecondary`).

### How to use it

**Find markets by keyword:** `keywords: ["bitcoin", "fed", "election"]`

**Whole categories:** `categories: ["Economics", "Crypto"]`

**Exact tickers:** `seriesTickers: ["KXBTCD"]`, `eventTickers: [...]` or `marketTickers: [...]`. Pair these with an Apify **schedule** to build a watchlist that updates every few minutes.

**Weather markets:** set `mode: "weather"`, `cities: ["NYC", "Chicago", "Miami"]` and `weatherType: "high"`. This covers 144 temperature and rain series worldwide, not just a handful of US cities.

**Resolved markets for backtests:** `status: "settled"` returns each market's final `result`.

**Filters:**

- `minVolume`, `minVolume24h`, `minOpenInterest`
- `minProbability` / `maxProbability` (e.g. only markets priced 5–95%)
- `closesWithinHours`
- `onlyWithQuote`

Combo (multi-leg) markets are hidden by default.

#### Example input

```json
{
  "keywords": ["fed"],
  "status": "open",
  "minVolume": 1000,
  "includePriceHistory": true,
  "historyInterval": "1d",
  "historyLookbackDays": 30,
  "maxItems": 100
}
```

### Pricing

You pay **per market returned**, and `maxItems` caps what a run can cost. Price history and order books are included at no extra charge. You also pay nothing for markets that your filters drop.

### Use cases

- **Traders and quants:** track odds, spreads and liquidity; export history for backtests; watch weather brackets before settlement.
- **Researchers and journalists:** see what the market implies about elections, rates, inflation or company events.
- **Dashboards and alerts:** schedule a run, then pipe the results to Google Sheets, Slack or a webhook with Apify integrations.

### FAQ

**Is this allowed?** Yes. It only reads Kalshi's public market data API, which Kalshi publishes for exactly this purpose. It doesn't log in or place orders.

**Why is a probability sometimes missing?** Very new or illiquid markets may have no bid, ask or last trade yet. Use `onlyWithQuote` to skip them.

**Something's wrong or missing?** Open an issue on the Issues tab, and it'll be fixed quickly.

*Not affiliated with Kalshi. Market data is provided as-is and isn't financial advice.*

# Actor input Schema

## `mode` (type: `string`):

Markets: search all of Kalshi. Weather: daily high/low temperature and rain markets for the cities you pick.

## `keywords` (type: `array`):

Match event or outcome titles, e.g. 'bitcoin', 'fed', 'trump', 'NFL'. Leave empty to list everything.

## `categories` (type: `array`):

Only these Kalshi categories. Leave empty for all.

## `seriesTickers` (type: `array`):

e.g. KXHIGHNY (NYC high temperature), KXBTCD (daily Bitcoin price), KXFED (Fed rate).

## `eventTickers` (type: `array`):

e.g. KXHIGHNY-26SEP28 to get every outcome of one event.

## `marketTickers` (type: `array`):

Exact markets to track, e.g. for a scheduled watchlist.

## `status` (type: `string`):

Settled = resolved markets with their result (for backtests and research).

## `cities` (type: `array`):

Match weather series titles, e.g. 'NYC', 'Chicago', 'Miami', 'Denver', 'Tokyo'. Empty = all cities.

## `weatherType` (type: `string`):

Daily high, daily low, rain, or all three.

## `minVolume` (type: `integer`):

Skip markets that have traded fewer contracts than this in total.

## `minVolume24h` (type: `integer`):

Skip markets with less 24-hour volume than this.

## `minOpenInterest` (type: `integer`):

Skip markets with less open interest than this.

## `minProbability` (type: `string`):

e.g. 0.05

## `maxProbability` (type: `string`):

e.g. 0.95

## `closesWithinHours` (type: `integer`):

Only markets that close within this many hours from now.

## `onlyWithQuote` (type: `boolean`):

Skip markets without both a bid and an ask (no live price).

## `excludeCombos` (type: `boolean`):

Kalshi lists thousands of parlay-style combos. Hidden by default when listing everything.

## `includePriceHistory` (type: `boolean`):

Adds a priceHistory array (close, high, low, bid, ask, volume, open interest) to each market.

## `historyInterval` (type: `string`):

Candle size for price history: 1 minute, 1 hour or 1 day.

## `historyLookbackDays` (type: `integer`):

How many days of price history to include.

## `includeOrderbook` (type: `boolean`):

Adds the current yes/no order book levels to each market.

## `orderbookDepth` (type: `integer`):

Number of price levels per side.

## `includeRules` (type: `boolean`):

Adds Kalshi's settlement rules text to each market.

## `maxItems` (type: `integer`):

You pay per market returned, so this caps the cost of a run.

## Actor input object example

```json
{
  "mode": "markets",
  "keywords": [
    "bitcoin",
    "fed"
  ],
  "status": "open",
  "weatherType": "all",
  "onlyWithQuote": false,
  "excludeCombos": true,
  "includePriceHistory": false,
  "historyInterval": "1h",
  "historyLookbackDays": 7,
  "includeOrderbook": false,
  "orderbookDepth": 10,
  "includeRules": false,
  "maxItems": 200
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `allFields` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        "bitcoin",
        "fed"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("peccarvalho/kalshi-markets").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "keywords": [
        "bitcoin",
        "fed",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("peccarvalho/kalshi-markets").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "bitcoin",
    "fed"
  ]
}' |
apify call peccarvalho/kalshi-markets --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,peccarvalho/kalshi-markets"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Prw0xBN4qZEyTRrxH/builds/9FaUCpwrdaTXevzRq/openapi.json
