# Polymarket Odds Snapshot (`splendorous_astrolabe_xs9/polymarket-odds-snapshot`) Actor

Current odds, volume, and price history for Polymarket markets as clean JSON. Cheap enough to schedule every 10 minutes.

- **URL**: https://apify.com/splendorous\_astrolabe\_xs9/polymarket-odds-snapshot.md
- **Developed by:** [Mike](https://apify.com/splendorous_astrolabe_xs9) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 market snapshots

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Polymarket Odds Snapshot

A **Polymarket odds API** you can call in one line: structured, analysis-ready odds for exactly the markets you care about — filter by category tag, 24h-volume floor, or an explicit list of market slugs. History mode adds recent **price history** per market (a time series straight from the public CLOB), so you get both the current snapshot and how the odds moved.

The cheapest way to put live prediction-market probabilities and price history into a spreadsheet, dashboard, model, or AI agent — no blockchain knowledge, no API keys.

### Three ways to select markets

1. **By slug list** — pass `market_slugs` and get exactly those markets (great for monitoring a fixed watchlist).
2. **By category** — `category: "crypto"` (or `politics`, `sports`, `economy`, `tech`, `world`, any Polymarket tag slug) returns the highest-volume open markets in that vertical.
3. **Top of the whole exchange** — leave both empty and get all open markets ordered by 24h volume, optionally with a `min_volume_24h` floor.

### Output

One flat row per market:

```json
{
  "question": "Will Bitcoin go Up or Down on August 4?",
  "market_slug": "bitcoin-up-or-down-on-august-4-2026",
  "condition_id": "0x80942ae6...",
  "outcomes": ["Up", "Down"],
  "outcome_prices": [0.9995, 0.0005],
  "price_by_outcome": {"Up": 0.9995, "Down": 0.0005},
  "yes_price": null,
  "best_bid": 0.999,
  "best_ask": 1.0,
  "spread": 0.001,
  "last_trade_price": 0.999,
  "volume_24h_usd": 1581410.95,
  "volume_total_usd": 74636359.98,
  "liquidity_usd": 23679.26,
  "end_date": "2026-08-05T00:00:00Z",
  "url": "https://polymarket.com/market/bitcoin-up-or-down-on-august-4-2026",
  "snapshot_utc": "2026-08-04T06:10:00+00:00"
}
```

In **history mode** each row additionally carries:

```json
{
  "history_interval": "1d",
  "history_fidelity_minutes": 10,
  "price_history": {"Up": [{"t": 1785772808, "p": 0.505}, {"t": 1785773410, "p": 0.515}]},
  "price_history_points": 145
}
```

(Series covers the market's first outcome token; for binary markets the other side is simply `1 − p`.)

### Input

| Field | Default | Description |
|---|---|---|
| `mode` | `current` | `current` or `history` (history caps markets at 25) |
| `market_slugs` | — | Explicit watchlist; overrides other filters |
| `category` | — | Polymarket tag slug (`crypto`, `politics`, …) |
| `min_volume_24h` | 0 | Volume floor in USD |
| `limit` | 100 | Max markets (by 24h volume, descending) |
| `history_interval` | `1d` | `1h`, `6h`, `1d`, `1w`, `1m`, `max` |
| `history_fidelity_minutes` | 10 | Series resolution |

### Use cases

#### Dashboards and spreadsheets

Schedule hourly, pipe the dataset to Google Sheets/BI, chart real-money probabilities over time.

#### Forecast benchmarking

Compare your model's probabilities (elections, sports, crypto, Fed decisions) against market consensus — and use history mode to score how the market converged.

#### Trading research

Spread + liquidity + 24h volume in one flat row makes screening for tradeable markets trivial.

### Using from Claude / AI agents (MCP)

Add Apify's MCP server (`https://mcp.apify.com`) to Claude, Cursor, or any MCP-capable client and your agent can pull live odds and price history mid-conversation:

```json
{
  "tool": "polymarket-odds-snapshot",
  "input": { "category": "politics", "mode": "history", "history_interval": "1w", "limit": 10 }
}
```

*"What does Polymarket say about the next Fed cut, and how did it move this week?"* — one call answers both halves.

### Data source and fair use

Only Polymarket's **public, unauthenticated** endpoints (Gamma market data + CLOB price history). No login, no keys. Snapshots are timestamped (`snapshot_utc`) so downstream consumers always know data freshness.

### Pricing

Pay per event: a tiny per-run fee plus a tenth of a cent per market row (and half a cent per market when price history is requested). A 100-market snapshot costs about $0.12.

# Actor input Schema

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

`current` returns one row per market with live odds/volume/liquidity. `history` additionally fetches a recent price time series per market from the public CLOB (markets are capped at 25 in this mode).

## `market_slugs` (type: `array`):

Explicit list of market slugs to fetch (the last path segment of the polymarket.com market URL). When set, `category` and `min_volume_24h` are ignored.

## `category` (type: `string`):

Filter markets by a Polymarket tag slug, e.g. `crypto`, `politics`, `sports`, `economy`, `tech`, `world`. Leave empty to scan all active markets by volume.

## `min_volume_24h` (type: `integer`):

Only include markets with at least this much 24-hour volume.

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

Maximum number of markets to return, ordered by 24h volume (descending). History mode caps this at 25.

## `history_interval` (type: `string`):

Time span of the price series in history mode.

## `history_fidelity_minutes` (type: `integer`):

Spacing between points in the price series (history mode). Lower = denser series.

## Actor input object example

```json
{
  "mode": "current",
  "market_slugs": [],
  "min_volume_24h": 0,
  "limit": 100,
  "history_interval": "1d",
  "history_fidelity_minutes": 10
}
```

# 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 = {
    "market_slugs": [],
    "category": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("splendorous_astrolabe_xs9/polymarket-odds-snapshot").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 = {
    "market_slugs": [],
    "category": "",
}

# Run the Actor and wait for it to finish
run = client.actor("splendorous_astrolabe_xs9/polymarket-odds-snapshot").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 '{
  "market_slugs": [],
  "category": ""
}' |
apify call splendorous_astrolabe_xs9/polymarket-odds-snapshot --silent --output-dataset

```

## MCP server setup

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

```

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/5OABpojQsEtA3WaPe/builds/dybpBwKg9qmI5HtYJ/openapi.json
