# Prediction Markets Data: Kalshi + Polymarket prices & matches (`eze007/prediction-markets-data`) Actor

All open Kalshi and Polymarket markets in one unified schema: YES/NO prices, volume, liquidity, close time, category. Order books, recent trades, and Kalshi-Polymarket matched pairs with the implied price gap. Public APIs only, pay per row, agent-ready.

- **URL**: https://apify.com/eze007/prediction-markets-data.md
- **Developed by:** [Eric Birdsong](https://apify.com/eze007) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## Prediction Markets Data — Kalshi + Polymarket

Every open market on **Kalshi** and **Polymarket** in **one schema**: YES/NO prices, best bid/ask, last trade, volume, 24h volume, open interest, liquidity, close time, category, settlement sources (Kalshi) and links. Plus **order books**, **recent trades**, and **cross-venue matches** — Kalshi↔Polymarket pairs on the same question with the price gap and the all-in cost of a hedged YES/NO position.

Public, read-only APIs. No keys, no trading, no browser.

### Data types

| dataType | Rows | Notes |
|---|---|---|
| `markets` | one per market | both venues, unified fields, sorted by volume; filter by `query`, `category`, `minVolume`, `status` |
| `events` | one per event | event groupings (Kalshi events / Polymarket events) with category and volume |
| `orderbook` | one per market | top-10 bid/ask ladders; pass `marketIds` or get the top markets by volume |
| `trades` | one per trade | recent prints with price, size, side, time |
| `matches` | one per matched pair | title + date + name matching with settlement-consistency checks; `confidence` = high / medium / low and `flags` explain any doubt |

### Examples

All open markets mentioning the Fed, both venues:

```json
{ "dataType": "markets", "query": "Fed", "minVolume": 10000 }
```

Cross-venue pairs with a gap of at least 3¢ (keep `maxMatchGapCents` at 100 and sort by `grossEdgeCents` in your sheet):

```json
{ "dataType": "matches", "minVolume": 5000 }
```

Order books for two specific markets:

```json
{ "dataType": "orderbook", "marketIds": ["KXFED-26DEC-T4.00", "will-no-fed-rate-cuts-happen-in-2026"] }
```

### Unified market row

`venue, id, eventId, title, subtitle, eventTitle, rules, yesPrice, noPrice, yesBid, yesAsk, lastPrice, volume, volume24h, openInterest, liquidity, status, category, openTime, closeTime, expirationTime, result, url` — Kalshi rows add `noBid, noAsk, marketType, settlementSources`; Polymarket rows add `slug, outcomes, outcomePrices, clobTokenIds`.

### Match row

`kalshiTicker, kalshiTitle, kalshiYes, kalshiYesAsk, kalshiNoAsk, polymarketId, polymarketTitle, polymarketYes, polymarketYesAsk, polymarketNoAsk, yesGapCents, hedgedCostYesKalshiNoPoly, hedgedCostYesPolyNoKalshi, grossEdgeCents, similarity, confidence, flags, note`.

Matching is conservative on purpose: titles that look alike but settle differently ("run for" vs "win", "Presidential" vs "Vice-Presidential", different people, different dates or thresholds) are penalised or dropped and the reason is written to `flags`. Edges are **gross of fees** — always check both venues' fee schedules and settlement rules before acting. Nothing here is investment advice.

### Pricing

| Event | Price | Example |
|---|---|---|
| Market row | $0.001 | 6,000 open markets on both venues = **$6.00** |
| Order book | $0.002 | 50 books = $0.10 |
| Trade | $0.0005 | 1,000 prints = $0.50 |
| Cross-venue match | $0.01 | a full matching pass (~60–200 pairs) = $0.60–$2.00 |

Schedule `markets` hourly and `matches` every 15 minutes to build your own feed. Free Apify plan: 10 rows per run.

### For AI agents (MCP)

Inputs are enums and plain strings. Typical agent calls: `markets` with a `query`, then `orderbook` with the returned `id`s.

### Limits

- Kalshi MVE/parlay collections are skipped by default (they are combinations of other markets).
- Polymarket data comes from the public Gamma and CLOB APIs (global Polymarket). Polymarket US is a separate venue and is not included.
- Not affiliated with Kalshi or Polymarket.

### Need a variant or a new data source?

Request it here — it ships as a pay-per-result Actor, usually within days, and you'll get the link in your request: https://github.com/Realdeal00/actor-requests/issues/new?template=request.yml

### Changelog

- 0.1 — initial release.

# Actor input Schema

## `dataType` (type: `string`):

markets = all open markets in one schema; events = event groupings; orderbook = bid/ask ladders for the markets you list (or the top markets by volume); trades = recent prints; matches = Kalshi↔Polymarket pairs on the same question with the implied price gap.

## `venues` (type: `array`):

Which venues to include.

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

Market status filter.

## `query` (type: `string`):

Only markets whose title contains this text (case-insensitive). Example: Fed, Bitcoin, NFL, election.

## `category` (type: `string`):

Optional category/tag filter (venue-specific labels, e.g. Politics, Sports, Crypto, Economics).

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

Skip thin markets below this lifetime volume.

## `marketIds` (type: `array`):

For orderbook/trades: Kalshi tickers (e.g. KXFED-26DEC-T4.00) and/or Polymarket condition IDs or slugs. If empty, the top markets by volume are used.

## `maxMatchGapCents` (type: `integer`):

matches only: keep pairs whose YES-price gap between venues is at most this many cents. Use 100 to see all matched pairs.

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

Stop after this many rows (controls cost).

## Actor input object example

```json
{
  "dataType": "markets",
  "venues": [
    "kalshi",
    "polymarket"
  ],
  "status": "open",
  "minVolume": 0,
  "maxMatchGapCents": 100,
  "maxItems": 2000
}
```

# Actor output Schema

## `results` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("eze007/prediction-markets-data").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("eze007/prediction-markets-data").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 '{}' |
apify call eze007/prediction-markets-data --silent --output-dataset

```

## MCP server setup

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

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/0TeiRic6u6GvWVxVp/builds/pp7KSey42NFiYkBJQ/openapi.json
