# Polymarket Odds & Arbitrage Intelligence (`nfa2026/polymarket-odds-intelligence`) Actor

Real-time Polymarket data feed: topic search, top-volume whale markets, and Dutch-book spread arbitrage scanner. Clean JSON with implied odds, volume, and CLOB token IDs for quant traders and AI agents.

- **URL**: https://apify.com/nfa2026/polymarket-odds-intelligence.md
- **Developed by:** [Roy Mootsana](https://apify.com/nfa2026) (community)
- **Categories:** AI, Business, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Intelligence & Odds API

Clean, structured, and real-time data access to the world’s largest prediction market. Extract implied probabilities, trading volumes, bid-ask spreads, and Central Limit Order Book (CLOB) contract identifiers directly from **Polymarket**.

Designed specifically for algorithmic trading desks, prediction market makers, quantitative researchers, and autonomous AI agents.

***

### Why Use This Actor?

Polymarket has become the primary real-time consensus engine for geopolitical shifts, Federal Reserve interest rate expectations, national elections, and macro economic milestones.

However, integrating Polymarket's raw catalog into automated trading infrastructure introduces repetitive engineering friction:

1. **Stringified JSON payloads:** Essential fields like `outcomePrices` and `clobTokenIds` are returned as escaped JSON strings, requiring manual JSON parsing on every item.
2. **Disconnected data structures:** Single-contract markets and multi-outcome events are nested differently across distinct endpoints.
3. **Missing trading metrics:** Raw responses do not compute relative bid-ask spreads, basket fair-value deviations, or percentage implied probabilities.

This Actor standardizes the entire data pipeline into typed, predictable JSON records ready for immediate programmatic consumption in sub-second execution time.

***

### Three Dedicated Operational Endpoints

Configure the `mode` parameter to match your workflow:

| Endpoint Mode | Focus | Practical Use Case |
|---|---|---|
| **Top Trending & Whales (`trending`)** | Top liquid markets ranked by USD volume | Macro sentiment monitors, whale volume trackers, high-liquidity dashboards |
| **Search by Topic (`search`)** | Keyword, ticker, or candidate lookup | News-driven trade triggers, automated event verification, research feeds |
| **Dutch-Book & Spread Scanner (`arbitrage_scanner`)** | Dislocated odds and wide bid-ask spreads | Statistical arbitrage, market making, negative-risk basket capture |

***

### Key Output Capabilities

- **Direct CLOB Token Identifiers:** Every outcome includes its raw Polygon ERC-1155 `clobTokenId`, allowing your bots to immediately route limit or market orders via Polymarket's Exchange API.
- **Spread & Liquidity Metrics:** Automatically computes `bestBid`, `bestAsk`, absolute `spreadUsd`, and `spreadRelativePct` (cost to cross the spread), highlighting market making and liquidity-harvesting opportunities.
- **Pre-computed Implied Probabilities:** Converts decimal pricing into percentage odds for binary (Yes/No) and multi-candidate events.
- **Dutch-Book Dislocation Detection:** Flags when an outcome basket deviates from $1.00 fair value, identifying discount profit margins.
- **AI Agent Native:** Zero-fluff JSON schema optimized for tool calling across LangChain, AutoGen, CrewAI, and OpenAI function calling.

***

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `mode` | Select | `trending` | Choose `trending`, `search`, or `arbitrage_scanner`. |
| `searchQuery` | String | `"Federal Reserve"` | Search term or ticker (used when `mode` is `search`). |
| `maxItems` | Number | `20` | Maximum number of market contracts to return (1–200). |
| `minVolumeUsd` | Number | `1000` | Filter out illiquid markets below a specified total volume floor. |
| `activeOnly` | Boolean | `true` | Only return markets currently open and accepting orders. |

***

### Standardized JSON Output

```json
{
  "id": "559652",
  "question": "Will Gavin Newsom win the 2028 Democratic presidential nomination?",
  "eventTitle": "Democratic Presidential Nominee 2028",
  "slug": "democratic-presidential-nominee-2028",
  "url": "https://polymarket.com/event/democratic-presidential-nominee-2028",
  "category": "Politics",
  "volumeTotalUsd": 27759450.56,
  "volume24hrUsd": 9533.74,
  "liquidityUsd": 184500.0,
  "bestBid": 0.152,
  "bestAsk": 0.153,
  "spreadUsd": 0.001,
  "spreadRelativePct": 0.66,
  "outcomes": [
    {
      "outcome": "Yes",
      "priceUsd": 0.1525,
      "impliedProbabilityPct": 15.25,
      "clobTokenId": "106229668102716149832209250222340847662201251266419359322746795373714233470739"
    },
    {
      "outcome": "No",
      "priceUsd": 0.8475,
      "impliedProbabilityPct": 84.75,
      "clobTokenId": "33007765079325382103458898680383691503895532108499178620460955049586020382226"
    }
  ],
  "sumOfPrices": 1.0,
  "isMispriced": false,
  "mispricingEdgePct": 0.0,
  "mispricingType": "fair",
  "endDate": "2028-11-08T00:00:00Z",
  "active": true,
  "closed": false,
  "scrapedAt": "2026-09-27T00:00:00.000Z"
}
```

***

### Code Examples

#### Python (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

## Run the Dutch-Book & Spread Scanner
run = client.actor("nfa2026/polymarket-odds-intelligence").call(
    run_input={
        "mode": "arbitrage_scanner",
        "maxItems": 25,
        "minVolumeUsd": 5000,
    }
)

for contract in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"Contract: {contract['question']}")
    print(f"Spread: ${contract.get('spreadUsd')} ({contract.get('spreadRelativePct')}%) | Volume: ${contract.get('volumeTotalUsd'):,.0f}")
```

#### Node.js / TypeScript

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

// Fetch top trending markets
const run = await client.actor('nfa2026/polymarket-odds-intelligence').call({
    mode: 'trending',
    maxItems: 10,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Model Context Protocol (MCP) for AI Agents

Integrate live prediction market discovery directly into **Claude Desktop**, **Cursor**, or custom LLM agent pipelines:

```json
{
  "mcpServers": {
    "polymarket": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/mcp-server",
        "--actors",
        "nfa2026/polymarket-odds-intelligence"
      ]
    }
  }
}
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/nfa2026~polymarket-odds-intelligence/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode": "trending", "maxItems": 5}'
```

# Actor input Schema

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

Select the data stream: Top Trending/Whale markets, Search by topic/keyword, or scan for Dutch-Book spread mispricings.

## `searchQuery` (type: `string`):

Keyword, topic, candidate, or ticker to search for (e.g. 'Federal Reserve', 'Bitcoin', 'Trump').

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

Maximum number of market contracts to return.

## `minVolumeUsd` (type: `number`):

Filter out illiquid markets with low trading volume.

## `activeOnly` (type: `boolean`):

Only return markets that are currently open and accepting bets.

## Actor input object example

```json
{
  "mode": "trending",
  "searchQuery": "Federal Reserve",
  "maxItems": 20,
  "minVolumeUsd": 1000,
  "activeOnly": true
}
```

# Actor output Schema

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

Dataset containing parsed Polymarket contracts with implied odds, spreads, and CLOB token IDs.

# 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("nfa2026/polymarket-odds-intelligence").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("nfa2026/polymarket-odds-intelligence").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 nfa2026/polymarket-odds-intelligence --silent --output-dataset

```

## MCP server setup

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

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/WDURM69zwU2J30it5/builds/dD8RYuU4CRq52YAMB/openapi.json
