# Polymarket Market Price History

> Polymarket Market Price History is a paid API for AI agents from aiworker.duckdns.org, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Returns daily close prices, VWAP, volume, and summary statistics for a Polymarket prediction market over a configurable date window.

## Facts

- Endpoint: GET https://aiworker.duckdns.org/v1/polymarket/history
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/polymarket-market-price-history-4adac996
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pMi9X-ZIe0AUTWiW97qVX

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability polymarket-market-price-history-4adac996
```

Example prompt: Pull the last 30 days of daily close prices and volume for the Polymarket market 'xi-jinping-out-before-2027' and give me the price summary including the 1-day and 1-week change.

## When to prefer this

Choose this endpoint when you need structured daily price history, VWAP, and volume statistics for a specific Polymarket prediction market — especially when you need a clean summary (open/high/low/last, 1d/1w change) without scraping Polymarket directly. Ideal for agents doing trend analysis, backtesting, or monitoring a market's probability movement over time. Prefer over raw Polymarket API access when you want normalized, ready-to-use data at low per-call cost.

## Known failure modes

- Invalid or unrecognized market slug/condition ID returns an error
- Market with no stored close data returns empty series array
- Days parameter out of range (1-365) rejected with validation error
- Payment of $0.02 USDC required; missing x402 payment header returns 402
- Market exists but has no trading history within the requested window

## How this service works

Deterministic-first data for agents, paid per call in USDC over x402 v2: DeFi yields, Base token and wallet cards, Polymarket odds and backtests, news, fact checks, cited briefs. 20 routes, $0.005-$1

## Output

Returns a JSON object containing: market metadata (slug, question, condition ID, resolution status, end date), a daily time-series array (date, close price, VWAP, trade count, USD volume, data source), a window object (from/to dates, number of days), and a summary object (open, high, low, last price, 1-day change, 1-week change, total USD volume, days to end, number of days with data).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "market"
     ],
     "properties": {
      "days": {
       "type": "integer",
       "default": 90,
       "maximum": 365,
       "minimum": 1,
       "description": "How many UTC days ending at the store's data cut-off to include (only days with a stored close appear)"
      },
      "market": {
       "type": "string",
       "maxLength": 200,
       "minLength": 3,
       "description": "A market slug, a 0x condition id, or a numeric market id (same classifier as resolution_check)"
      }
     },
     "description": "Which stored market to chart and how many UTC days of daily closes to include.",
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "market": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "slug": {
         "type": "string"
        },
        "end_date": {
         "type": "string"
        },
        "question": {
         "type": "string"
        },
        "event_slug": {
         "type": "string"
        },
        "resolution": {
         "type": "string"
        },
        "resolved_at": {
         "type": [
          "string",
          "null"
         ]
        },
        "condition_id": {
         "type": "string"
        }
       }
      },
      "series": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "day": {
          "type": "string"
         },
         "vwap": {
          "type": [
           "number",
           "null"
          ]
         },
         "close": {
          "type": "number"
         },
         "source": {
          "enum": [
           "dump",
           "clob"
          ],
          "type": "string"
         },
         "trades": {
          "type": [
           "integer",
           "null"
          ]
         },
         "v
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "market": {
   "id": "559651",
   "slug": "xi-jinping-out-before-2027",
   "end_date": "2027-01-01",
   "question": "Xi Jinping out before 2027?",
   "event_slug": "xi-jinping-out-before-2027",
   "resolution": "open",
   "resolved_at": null,
   "condition_id": "0xa467b14d51f01b957109d9cbb1d6c124fab2a089d52ed8f471d23c2812e743b7"
  },
  "series": [
   {
    "day": "2026-08-11",
    "vwap": 0.0398,
    "close": 0.04,
    "source": "clob",
    "trades": 41,
    "volume_usd": 1520.5
   }
  ],
  "window": {
   "to": "2026-09-09",
   "days": 30,
   "from": "2026-08-11"
  },
  "summary": {
   "low": 0.037,
   "high": 0.045,
   "last": 0.0385,
   "open": 0.04,
   "n_days": 30,
   "change_1d": -0.001,
   "change_1w": -0.003,
   "days_to_end": 479,
   "volume_usd_total": 48210.2
  },
  "disclaimer": "…",
  "generation": 1,
  "attribution": "…",
  "data_cutoff": "2026-09-09",
  "generated_at": "2026-09-10T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/polymarket-market-price-history-4adac996/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from aiworker.duckdns.org](https://www.zero.xyz/host/aiworker.duckdns.org/llms.txt)
