# Polymarket Probability Inefficiency & Liquidity Scanner Feed (`quantforge_data/polymarket-inefficiency-scanner`) Actor

Prebuilt Polymarket public Gamma API snapshots of multi-outcome NegRisk overround/underround probability distortions, executable ask sums, two-sided bid-ask spreads, and liquidity/volume metrics with Pay-Per-Event pricing and Standby MCP support. Kalshi is explicitly excluded per ToS.

- **URL**: https://apify.com/quantforge_data/polymarket-inefficiency-scanner.md
- **Developed by:** [QuantForge Data](https://apify.com/quantforge_data) (community)
- **Categories:** Business, AI, MCP servers
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 polymarket snapshot items

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

Learn more: https://docs.apify.com/actors/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 Probability Inefficiency & Liquidity Scanner Feed

Published by **QuantForge Data** (`quantforge_data`).

A low-latency, prebuilt prediction-market analytics feed for arbitrage bots, event-driven trading systems, quant researchers, and AI trading agents. Instead of spending cloud compute scraping Polymarket endpoints on every run, this Actor streams pre-normalized hourly snapshots derived exclusively from Polymarket's public read-only Gamma API, surfacing multi-outcome NegRisk probability sum distortions (`overround_bps` / `underround_edge_bps`), executable ask sums, wide two-sided bid-ask spreads, and liquidity/volume depth.

### Why Use This Actor

- **Instant Multi-Outcome NegRisk Distortion Detection**: Aggregates every active mutually exclusive leg in Polymarket NegRisk events to compute `price_sum`, `overround_bps`, `underround_edge_bps`, and executable `ask_price_sum` / `ask_overround_bps`.
- **Augmented NegRisk False-Positive Protection**: Explicitly exposes `neg_risk_augmented` and `is_complete_outcome_set` flags and provides `exclude_augmented: true` so trading bots avoid false underround signals caused by unquoted `"Other"` residual buckets.
- **Two-Sided Orderbook Spread Screening**: Separates true two-sided bid-ask books (`two_sided_book: true`) from one-sided noise and calculates effective `spread_bps` alongside `liquidity_usd` and `volume_24h_usd`.
- **Batch, Standby REST API, and Native MCP Support**: Run scheduled Apify dataset pulls, query the Standby REST endpoint (`GET`/`POST /v1/inefficiencies`), or connect AI agents directly via JSON-RPC 2.0 MCP (`POST /mcp`).

### Output Data Fields

Each returned dataset item (or Standby/MCP record) includes:

| Field | Type | Description |
|---|---|---|
| `market_id` | `string` | Polymarket market ID, or `event:<event_id>` for aggregated multi-outcome NegRisk baskets |
| `record_type` | `string` | `"market"` or `"multi_outcome_event"` |
| `event_id` | `string` | Parent Polymarket event identifier |
| `event_slug` | `string` | URL slug of the parent event |
| `question` | `string` | Market question (or event title for multi-outcome baskets) |
| `is_multi_outcome` | `boolean` | `true` for multi-outcome NegRisk baskets or markets with 3+ outcomes |
| `neg_risk` | `boolean` | Indicates NegRisk mutually exclusive market structure |
| `neg_risk_augmented` | `boolean` | `true` when Polymarket marks the event `negRiskAugmented` (unquoted `"Other"` bucket risk) |
| `is_complete_outcome_set` | `boolean` | `true` when all active legs are priced and the event is not augmented |
| `outcome_count` | `integer` | Number of priced outcomes or NegRisk legs |
| `outcomes` | `array` | Outcome labels, implied prices, and (for baskets) per-leg `best_bid` / `best_ask` |
| `price_sum` | `number` | Sum of outcome probabilities (or sum of YES prices across NegRisk legs) |
| `overround_bps` | `number` | `round((price_sum - 1.0) * 10000, 2)` (positive = overpriced, negative = underpriced) |
| `underround_edge_bps` | `number` | Theoretical gross long-all-outcomes edge in bps when `price_sum < 1.0` |
| `ask_price_sum` | `number \| null` | Executable sum of `bestAsk` prices across legs when two-sided quotes exist |
| `ask_overround_bps` | `number \| null` | Executable ask-sum overround in bps |
| `best_bid` / `best_ask` | `number \| null` | Top-of-book bid/ask (or summed leg bids/asks for baskets) |
| `spread_bps` | `number \| null` | Effective two-sided bid-ask spread in basis points |
| `two_sided_book` | `boolean` | `true` when both bid and ask quotes are present |
| `liquidity_usd` | `number` | Reported market or event liquidity in USD |
| `volume_24h_usd` | `number` | Reported 24-hour trading volume in USD |
| `end_date` | `string \| null` | Scheduled market resolution timestamp (ISO 8601) |
| `signal_tags` | `array<string>` | Rule tags such as `underround_arb`, `overround_anomaly`, `wide_spread`, `multi_outcome_negrisk`, `complete_outcome_set` |
| `fetched_at` | `string` | Snapshot generation UTC timestamp |
| `attribution` | `string` | Source attribution string |

### Filter Inputs

| Input Field | Type | Default | Description |
|---|---|---|---|
| `min_liquidity_usd` | `number` | `null` | Minimum `liquidity_usd` threshold |
| `min_abs_overround_bps` | `number` | `null` | Minimum `abs(overround_bps)` threshold in bps |
| `only_underround` | `boolean` | `false` | Return only records where `underround_edge_bps > 0` |
| `min_volume_24h_usd` | `number` | `null` | Minimum `volume_24h_usd` threshold |
| `min_spread_bps` | `number` | `null` | Minimum two-sided `spread_bps` threshold |
| `only_multi_outcome` | `boolean` | `false` | Return only multi-outcome NegRisk baskets / 3+ outcome markets |
| `exclude_augmented` | `boolean` | `false` | Exclude `neg_risk_augmented: true` events to prevent false underrounds |
| `event_slug` | `string` | `null` | Case-insensitive substring filter on `event_slug` |
| `sort_by` | `string` | `"snapshot"` | Sort order: `snapshot`, `overround`, `underround`, `spread`, `liquidity`, `volume` |
| `limit` | `integer` | `50` | Maximum records returned (`1` to `1000`) |
| `snapshot_url` | `string` | env default | Optional HTTPS URL override pointing to a custom `snapshot.jsonl` |

#### Example Batch Input

```json
{
  "only_multi_outcome": true,
  "exclude_augmented": true,
  "min_liquidity_usd": 10000,
  "min_abs_overround_bps": 25,
  "sort_by": "overround",
  "limit": 25
}
```

### Standby REST API & MCP Server

When enabled in Apify Standby Mode, the Actor exposes low-latency HTTP and MCP endpoints:

- `GET /` — Service metadata, pricing, attribution, and Apify container readiness probe
- `GET /health` — Health status JSON
- `GET /v1/inefficiencies` — Query filtered snapshots via URL query parameters (e.g., `?only_multi_outcome=true&exclude_augmented=true&limit=20`)
- `POST /v1/inefficiencies` — Query filtered snapshots with a JSON filter body
- `POST /mcp` — JSON-RPC 2.0 MCP endpoint (`initialize`, `ping`, `tools/list`, `tools/call`)

#### MCP Tool: `query_polymarket_inefficiencies`

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "query_polymarket_inefficiencies",
    "arguments": {
      "only_multi_outcome": true,
      "exclude_augmented": true,
      "min_liquidity_usd": 10000,
      "limit": 10
    }
  }
}
```

### Pricing (Pay-Per-Event)

| Event Name | Price (USD) | Description |
|---|---|---|
| `apify-actor-start` | `$0.00005` | Standard Apify startup event per run (covers first 5 seconds of compute) |
| `polymarket-snapshot-item` | `$0.0015` | Per filtered snapshot record returned (`$1.50 / 1,000 items`) |

### More Feeds & MCP Servers by QuantForge Data

- [**Crypto Perpetual Funding Rate APR & Cross-Venue Spread Feed**](https://apify.com/quantforge_data/crypto-perp-funding-arb) — Hourly multi-venue funding APR, basis, OI, and delta-neutral carry spreads.
- [**U.S. SEC Form 4 Open-Market Insider & Cluster Buy Signal Feed**](https://apify.com/quantforge_data/sec-form4-cluster-insider) — Strictly PII-free open-market insider buys/sales, Rule 10b5-1 flags, and cluster counts.
- [**U.S. SEC Form D Startup & Private Funding Leads Feed**](https://apify.com/quantforge_data/sec-form-d-funding-leads) — Daily PII-free Regulation D private placement & startup fundraising leads.
- [**Doc-to-LLM Markdown, Table JSON, RAG Chunker & PII Redactor MCP**](https://apify.com/quantforge_data/doc-to-llm-markdown-mcp) — Zero-scraping deterministic HTML-to-Markdown, table parser, RAG chunker, and PII redactor.

### FAQ & Legal Attribution

#### Why is `exclude_augmented: true` recommended for arbitrage bots?

Polymarket `negRiskAugmented: true` events can include an unquoted residual `"Other"` outcome bucket, which makes the sum of quoted YES prices look artificially below `1.00`. Setting `exclude_augmented: true` restricts results to complete outcome sets (`is_complete_outcome_set: true`).

#### How frequently are snapshots updated?

Hourly via edge scheduled pipelines reading Polymarket's public Gamma API.

- **Data Source**: Exclusively derived from Polymarket's public, unauthenticated, read-only Gamma API (`https://gamma-api.polymarket.com/`, documentation at `https://docs.polymarket.com/`).
- **Kalshi Explicitly Excluded**: **Kalshi market data is strictly excluded** from this feed and all snapshots in accordance with Kalshi Developer Agreement Section 3.1 (which prohibits caching, cross-source aggregation, redistribution, and AI training).
- **Zero PII**: Output records contain market-level analytics only; personal identifying information and user wallet addresses are completely excluded.
- **Disclaimer**: Provided as an unofficial analytical data feed for informational and research purposes only. Not financial or investment advice.

### Local CLI & Standby Smoke Testing

The reader uses only the Python 3 standard library locally (`apify` is imported dynamically only inside Apify Cloud):

```bash
python main.py --snapshot-file snapshot.jsonl --only-multi-outcome --exclude-augmented --limit 5
python main.py --snapshot-file snapshot.jsonl --serve-standby --port 4321
```

# Actor input Schema

## `min_liquidity_usd` (type: `number`):

Filter markets or NegRisk event baskets with liquidity_usd greater than or equal to this threshold.

## `min_abs_overround_bps` (type: `number`):

Filter records whose absolute probability sum deviation |overround_bps| is at least this threshold in basis points.

## `only_underround` (type: `boolean`):

When enabled, only return records with underround_edge_bps > 0 (outcome probability sum < 1.0).

## `min_volume_24h_usd` (type: `number`):

Filter records with 24-hour trading volume (volume_24h_usd) greater than or equal to this threshold.

## `min_spread_bps` (type: `number`):

Filter records with an observed two-sided bid-ask spread (spread_bps) at or above this threshold in basis points.

## `only_multi_outcome` (type: `boolean`):

When enabled, only return multi-outcome NegRisk event baskets or markets with 3+ outcomes.

## `exclude_augmented` (type: `boolean`):

When enabled, exclude negRiskAugmented=true events that contain an unquoted residual 'Other' bucket and can cause false underround signals.

## `event_slug` (type: `string`):

Optional case-insensitive substring filter matched against event_slug.

## `sort_by` (type: `string`):

Ordering of returned snapshot records.

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

Maximum number of filtered snapshot records to return (1..1000).

## `snapshot_url` (type: `string`):

Optional HTTPS URL to a prebuilt snapshot.jsonl. Overrides the Actor SNAPSHOT_URL environment variable when provided.

## Actor input object example

```json
{
  "only_underround": false,
  "only_multi_outcome": false,
  "exclude_augmented": true,
  "sort_by": "snapshot",
  "limit": 50
}
```

# Actor output Schema

## `resultsDataset` (type: `string`):

Normalized Polymarket market and multi-outcome NegRisk inefficiency records.

## `summaryOutput` (type: `string`):

Matched count, delivered count, charged PPE events, and active query filter metadata.

# 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("quantforge_data/polymarket-inefficiency-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("quantforge_data/polymarket-inefficiency-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 '{}' |
apify call quantforge_data/polymarket-inefficiency-scanner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,quantforge_data/polymarket-inefficiency-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/n4DtKgB55HP59Zpov/builds/M98T1dm389xZ8zgm3/openapi.json
