# Polymarket & Kalshi Arbitrage Scanner — Odds API | $1/1K (`kiosklabs/polymarket-kalshi-arbitrage`) Actor

Scan real-time prediction market odds, volume, liquidity, and cross-venue arbitrage spreads across Polymarket, Kalshi, and Manifold Markets.

- **URL**: https://apify.com/kiosklabs/polymarket-kalshi-arbitrage.md
- **Developed by:** [batuhan senavci](https://apify.com/kiosklabs) (community)
- **Categories:** Automation, Developer tools, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.75 / 1,000 prediction market / arbitrage contracts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Polymarket & Kalshi Prediction Market Arbitrage & Odds Scanner

Scan live prediction market contracts, implied `YES`/`NO` probabilities, liquidity, volume, and **cross-venue probability spreads** across **Polymarket**, **Kalshi**, and **Manifold Markets** in one fast run.

The Actor calls the three venues' public market-data APIs directly and in parallel (`gamma-api.polymarket.com`, `api.elections.kalshi.com`, `api.manifold.markets`). No API keys, no login, no third-party relay.

***

### Why Traders, Quant Bots & AI Agents Use This Scanner

Prediction market liquidity is fragmented between a regulated US event exchange (**Kalshi**), an on-chain orderbook (**Polymarket**), and a forecasting platform (**Manifold**). Similar macro, crypto, Fed rate, geopolitical, and AI milestone questions can trade several percentage points apart across venues.

This Actor normalizes cross-venue odds into flat rows with one consistent set of typed columns:

- **`CROSS_VENUE_ARBITRAGE` rows** — two contracts on different venues whose titles share at least two significant keywords and whose YES probabilities differ by at least `minSpreadPct` (`spreadPct`, `buyYesVenue`, `sellYesVenue`, both titles, both URLs, `sharedKeywords`).
- **`VENUE_MARKET_ODDS` rows** — individual contract odds (`venue`, `title`, `yesProbabilityPct`, `noProbabilityPct`, `volumeUsd`, `liquidityUsd`, `marketUrl`).
- **`SUMMARY` key-value record** — per-venue fetch status, scan counts, and whether the charge limit was reached.

#### Read this before trading on a spread

- Pairs are matched by **title keyword overlap**, which is a heuristic. Two contracts can share keywords and still resolve on different dates, thresholds, or rules. Always open `buyYesMarketUrl` and `sellYesMarketUrl` and compare the resolution criteria before acting.
- `spreadPct` is a gap between quoted probabilities. It does not include fees, slippage, or order-book depth.
- **Manifold is a play-money venue.** Its probabilities are useful as a forecasting signal, but it cannot be one leg of a real-money arbitrage. `volumeUsd` and `liquidityUsd` are `null` for Manifold rows.
- Kalshi `volumeUsd` is the traded contract count (each contract settles at $1 notional).

***

### Input Parameters

| Field | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `query` | `string` | `""` | Optional keyword filter (e.g. `bitcoin`, `fed`, `recession`, `ai`). Leave empty to scan top active markets. |
| `limit` | `integer` | `20` | Max spread rows **and** max market rows (`1`–`100` each). |
| `minSpreadPct` | `string` | `"1.5"` | Minimum YES probability gap, in percentage points, for a pair to be reported. Decimals allowed. |
| `includeMarkets` | `boolean` | `true` | Also output one `VENUE_MARKET_ODDS` row per contract. Set `false` for spread rows only. |

#### Example Input

```json
{
  "query": "bitcoin",
  "limit": 20,
  "minSpreadPct": "3",
  "includeMarkets": true
}
```

***

### Example Output

```json
[
  {
    "recordType": "CROSS_VENUE_ARBITRAGE",
    "venue": "kalshi+polymarket",
    "title": "Will Bitcoin close above $150,000 in 2026?",
    "yesProbabilityPct": null,
    "noProbabilityPct": null,
    "spreadPct": 5.4,
    "buyYesVenue": "kalshi",
    "sellYesVenue": "polymarket",
    "buyYesProbabilityPct": 31.0,
    "sellYesProbabilityPct": 36.4,
    "buyYesTitle": "Will Bitcoin close above $150,000 in 2026?",
    "sellYesTitle": "Bitcoin above $150,000 by December 31, 2026?",
    "buyYesMarketUrl": "https://kalshi.com/markets/kxbtc",
    "sellYesMarketUrl": "https://polymarket.com/event/bitcoin-above-150k",
    "sharedKeywords": ["bitcoin", "150000", "2026"],
    "volumeUsd": null,
    "liquidityUsd": null,
    "marketUrl": "https://kalshi.com/markets/kxbtc",
    "query": "bitcoin",
    "scrapedAt": "2026-11-13T11:17:00.000Z"
  },
  {
    "recordType": "VENUE_MARKET_ODDS",
    "venue": "polymarket",
    "title": "Bitcoin above $150,000 by December 31, 2026?",
    "yesProbabilityPct": 36.4,
    "noProbabilityPct": 63.6,
    "spreadPct": null,
    "buyYesVenue": null,
    "sellYesVenue": null,
    "buyYesProbabilityPct": null,
    "sellYesProbabilityPct": null,
    "buyYesTitle": null,
    "sellYesTitle": null,
    "buyYesMarketUrl": null,
    "sellYesMarketUrl": null,
    "sharedKeywords": [],
    "volumeUsd": 14500000,
    "liquidityUsd": 820000,
    "marketUrl": "https://polymarket.com/event/bitcoin-above-150k",
    "query": "bitcoin",
    "scrapedAt": "2026-11-13T11:17:00.000Z"
  }
]
```

***

### Pricing (Pay-Per-Event)

- **`market-scanned`** — charged once per row pushed to the dataset (spread rows and market rows alike).

A run never pushes more than `2 × limit` rows. If your run's maximum charge limit is reached, the Actor stops and does not push unpaid rows.

### Failure Behaviour

- If **all three** venues fail (network error, HTTP error, timeout), the run ends as **FAILED** with the upstream errors in the status message. Nothing is pushed and nothing is charged.
- If one or two venues fail, the run continues with the remaining data and lists the unavailable venues in the status message and in `SUMMARY.venueStatus`.
- If nothing matches your `query` / `minSpreadPct`, the run succeeds with an empty dataset and no charge.

***

### Automate Alerts with n8n, Make.com, Zapier & Apify Schedules

#### Spread alert bot (n8n)

1. Add a **Schedule Trigger** (for example every 15 minutes).
2. Call **Apify → Run an Actor and Get Dataset** (`devoted_helix/polymarket-kalshi-arbitrage`).
3. Add an **IF** node filtering `{{ $json.recordType === "CROSS_VENUE_ARBITRAGE" && $json.spreadPct >= 3 }}`.
4. Send the matching rows to **Telegram**, **Discord**, or **Slack**.

#### Make.com & Zapier

1. Schedule **Apify: Run Actor**.
2. Route dataset items to **Google Sheets** odds trackers, **Notion** research dashboards, or email alerts.

# Actor input Schema

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

Optional topic or keyword filter across Polymarket, Kalshi & Manifold (e.g., 'bitcoin', 'fed', 'election', 'ai', 'tariff'). Leave empty to scan top active markets.

## `limit` (type: `integer`):

Maximum number of cross-venue spread rows AND maximum number of individual market rows to return (1–100 each, default: 20). Each pushed row is one 'market-scanned' event.

## `minSpreadPct` (type: `string`):

Only report cross-venue pairs whose YES probabilities differ by at least this many percentage points (default: 1.5). Decimals allowed, e.g. 3 or 4.5.

## `includeMarkets` (type: `boolean`):

When enabled, also outputs one VENUE_MARKET_ODDS row per scanned contract (highest volume first). Disable to receive only CROSS_VENUE_ARBITRAGE rows.

## Actor input object example

```json
{
  "query": "bitcoin",
  "limit": 20,
  "minSpreadPct": "1.5",
  "includeMarkets": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (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 = {
    "query": "bitcoin"
};

// Run the Actor and wait for it to finish
const run = await client.actor("kiosklabs/polymarket-kalshi-arbitrage").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 = { "query": "bitcoin" }

# Run the Actor and wait for it to finish
run = client.actor("kiosklabs/polymarket-kalshi-arbitrage").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 '{
  "query": "bitcoin"
}' |
apify call kiosklabs/polymarket-kalshi-arbitrage --silent --output-dataset

```

## MCP server setup

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

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/A9eUlujZqIIOuwpCf/builds/gYB8fhlIOEFcEJk4S/openapi.json
