# Prediction Market Mispricing Scanner — Polymarket (`hodookim/prediction-market-mispricing-scanner`) Actor

Finds contradictions in Polymarket pricing: implied probability distributions from strike ladders, monotonicity violations, and complete-set costs priced at live asks net of fees.

- **URL**: https://apify.com/hodookim/prediction-market-mispricing-scanner.md
- **Developed by:** [Hodookim](https://apify.com/hodookim) (community)
- **Categories:** AI, Developer tools, Agents
- **Stats:** 2 total users, 1 monthly users, 79.3% 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 Market Mispricing Scanner — Polymarket

Finds **contradictions** in Polymarket pricing. Not forecasts — contradictions.

Nobody knows whether a price will rise. But if a higher strike is priced above a
lower one, or if buying every outcome of an event costs less than the $1 it pays,
that is wrong under any view. Those signals need no argument.

### What it returns

**Implied probability distributions.** Polymarket runs strike ladders — *"Bitcoin
above $62,000 on August 14?"* at many strikes for one expiry. Read together they
form a cumulative distribution, which yields an implied median, an 80% range, and
a term structure that widens with time. This is the information an options surface
carries, extracted from a prediction market.

```
0.89 days left   median $63,263   80% range $62,151 – $65,182
1.89 days left   median $63,411   80% range $61,896 – $65,494
2.89 days left   median $63,420   80% range $61,316 – $65,700
```

**Monotonicity violations.** In that same ladder the curve must fall as strikes
rise. Where it does not, the two strikes contradict each other:

```
$70,000 → 0.0015   vs   $72,000 → 0.0020   (excess 0.0005)
```

**Complete-set costs.** Binary markets where YES + NO costs under $1, and
multi-outcome (negRisk) events where every mutually exclusive outcome together
costs under $1 — both priced at live asks, net of fees, with the size actually
executable at that level.

### Three mistakes it avoids

**Midpoints cannot show a gap.** `outcomePrices` from the Gamma API are midpoints
and sum to 1 by construction. Scanners built on them report edges that vanish the
moment you try to buy. Every price here comes from the CLOB order book.

**Fees are not a constant.** Polymarket's taker fee is `shares × rate × p × (1-p)`
— a parabola, largest at even odds and vanishing in the tails. Subtracting a flat
buffer is simultaneously too small near $0.50 and too large at the extremes.
Markets whose fee rate cannot be determined are excluded rather than assumed free.

**Partial outcome sets are not arbitrage.** Buying 13 of an event's 45 outcomes
for $0.28 looks like a 72% edge, but the winner may be among the other 32. Worse,
the fewer outcomes counted the better it scores, so a naive ranking fills its top
slots with the most broken candidates. Events missing any outcome are disqualified
and reported with the reason.

negRisk sets are ranked by **annualised return**, not absolute profit. Their legs
belong to different markets, form no market's complete set, and cannot be merged —
capital is locked until resolution, so a two-year lock-up with a real gap is worth
less than a two-week one.

### Input

| Field | Default | Meaning |
|---|---|---|
| `assets` | `["bitcoin","ethereum"]` | Assets whose strike ladders to read |
| `includeDistributions` | `true` | Implied distributions and violations |
| `includeBinary` | `true` | YES + NO complete sets |
| `includeNegRisk` | `true` | Multi-outcome complete sets |
| `onlyProfitable` | `false` | Keep only rows with an edge or a violation |
| `limit` | `20` | Rows per section |
| `minLiquidity` | `1000` | Skip thin books |
| `maxOutcomes` | `60` | Skip events too wide to quote fully |

### Output

One dataset, one row per finding, each tagged with `type`:
`implied_distribution`, `binary_complete_set`, `negrisk_complete_set`.

### Honest limits

- Prices move. A gap visible when the actor runs may be gone seconds later.
- Legs are quoted at the best ask only; filling more than `executable_shares`
  walks the book and costs more.
- Gas and any platform fees beyond the taker fee are not included.
- Most of the time nothing is profitable, and the run says so. A scanner that
  always finds opportunities is measuring midpoints.

Data comes from Polymarket's public Gamma and CLOB APIs. No key required.

# Actor input Schema

## `assets` (type: `array`):

Crypto assets whose strike ladders are read as a probability distribution. Polymarket runs these as 'Bitcoin above $X on <date>?' markets.

## `includeDistributions` (type: `boolean`):

Implied median, 80% range and how it widens with expiry, plus any strike priced out of order against its neighbours.

## `includeBinary` (type: `boolean`):

Markets where buying YES and NO together costs less than $1, priced at live asks net of the taker fee.

## `includeNegRisk` (type: `boolean`):

Events where buying every mutually exclusive outcome costs less than $1. Events missing any outcome are disqualified rather than scored on a partial set.

## `onlyProfitable` (type: `boolean`):

Drop rows with no positive edge and no monotonicity violation.

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

How many markets to return for each of the complete-set sections.

## `minLiquidity` (type: `integer`):

Skip binary markets thinner than this. Thin books show edges that cannot be filled.

## `maxOutcomes` (type: `integer`):

Events with more outcomes than this are skipped, since every outcome must be quoted before the set can be scored.

## Actor input object example

```json
{
  "assets": [
    "bitcoin",
    "ethereum"
  ],
  "includeDistributions": true,
  "includeBinary": true,
  "includeNegRisk": true,
  "onlyProfitable": false,
  "limit": 20,
  "minLiquidity": 1000,
  "maxOutcomes": 60
}
```

# Actor output Schema

## `findings` (type: `string`):

Every row, tagged with type: implied\_distribution, binary\_complete\_set or negrisk\_complete\_set.

## `distributions` (type: `string`):

Strike ladders read as a cumulative distribution, with implied median, 80% range and any strike priced out of order.

## `completeSets` (type: `string`):

Cost of buying every outcome, at live asks and net of the taker fee, with the size fillable at that level.

# 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 = {
    "assets": [
        "bitcoin",
        "ethereum"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hodookim/prediction-market-mispricing-scanner").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 = { "assets": [
        "bitcoin",
        "ethereum",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("hodookim/prediction-market-mispricing-scanner").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 '{
  "assets": [
    "bitcoin",
    "ethereum"
  ]
}' |
apify call hodookim/prediction-market-mispricing-scanner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hodookim/prediction-market-mispricing-scanner"
        }
    }
}
```

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/xRAcMftLxQ0kJ1HYb/builds/b7yhSndm4q4sWHAxE/openapi.json
