# Prediction Markets Odds API — Kalshi + Polymarket (`lovely_meadowland/prediction-markets-odds`) Actor

Live odds from Kalshi and Polymarket in one normalized schema: implied probability, bid/ask, 24h volume, liquidity, close time. Public data, no login, no proxies. Filter by keyword, volume and close date.

- **URL**: https://apify.com/lovely_meadowland/prediction-markets-odds.md
- **Developed by:** [Veronika Skuta](https://apify.com/lovely_meadowland) (community)
- **Categories:** Developer tools, AI, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 market storeds

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

## Prediction Markets Odds API — Kalshi + Polymarket

One run, one normalized table of live odds from **Kalshi** and **Polymarket**.

- `yesProbability` — implied probability (mid of bid/ask, falls back to last trade)
- `yesBid`, `yesAsk`, `lastPrice`, `volume24h`, `totalVolume`, `volumeUnit` (USD on Polymarket, $1-contracts on Kalshi), `liquidityUsd`, `openInterest`
- `closesAt`, `category`, `url`, optional resolution `rules`

Uses the exchanges' public market-data endpoints. No login, no proxies, no browser — runs fast and cheap and doesn't break on page redesigns.

### Use cases

- Feed odds into a trading model, a dashboard or an AI agent
- Monitor markets on a topic (`search: "fed"`, `closesWithinDays: 7`)
- Compare how Kalshi and Polymarket price the same event

### Pricing

Pay per event: **$0.002 per market stored** (filtered-out markets are free) plus the standard Actor start event.

### Example output

```json
{
  "venue": "polymarket",
  "question": "Xi Jinping out before 2027?",
  "outcome": "Yes",
  "yesProbability": 0.06,
  "volume24h": 15234.1,
  "volumeUnit": "usd",
  "liquidityUsd": 603018.9,
  "closesAt": "2027-01-01T04:59:00Z",
  "url": "https://polymarket.com/market/xi-jinping-out-before-2027"
}
```

Data is informational. Not affiliated with Kalshi or Polymarket.

# Actor input Schema

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

Which exchanges to read.

## `search` (type: `string`):

Only markets whose question, outcome or category contains this text (case-insensitive). Example: bitcoin, election, fed.

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

Skip illiquid markets. USD for Polymarket; contracts (each pays up to $1) for Kalshi.

## `closesWithinDays` (type: `integer`):

Only markets that close in the next N days. 0 = no limit.

## `maxResults` (type: `integer`):

You are charged per market stored.

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

Adds the market's resolution text (longer rows).

## Actor input object example

```json
{
  "venues": [
    "kalshi",
    "polymarket"
  ],
  "search": "",
  "minVolume24h": 0,
  "closesWithinDays": 0,
  "maxResults": 50,
  "includeRules": false
}
```

# Actor output Schema

## `markets` (type: `string`):

All markets stored by this run, with probability, bid/ask, volume and close time.

# 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 = {
    "maxResults": 50
};

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

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

```

## MCP server setup

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

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/LxKFTWcln7OVLoCxd/builds/3ciKKWcjqxgv9HO3C/openapi.json
