# x402-factory Historical Prediction Market Data

> x402-factory Historical Prediction Market Data is a paid API for AI agents from x402-factory.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-13).

Returns historical probability or price data for a specific prediction market identified by slug, over an optional date range and granularity.

## Facts

- Endpoint: GET https://x402-factory.com/v1/history/%7Bslug%7D
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-factory-historical-prediction-market-data-ba3c2834
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vCwjVKu76ZusAsutAOhPM

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 x402-factory-historical-prediction-market-data-ba3c2834
```

Example prompt: Pull the daily historical probability data for the 'trump-wins-2024' market from 2024-09-01 to 2024-11-05 so I can see how the odds moved leading up to election day.

## When to prefer this

Use this endpoint when you need historical time-series probability data for a specific prediction market event identified by its slug. It is the right choice for backtesting, charting probability trends over time, or correlating market movements with real-world events. Prefer this over the live-board endpoints when you need past data rather than current probabilities.

## Known failure modes

- Invalid slug format (must match kebab-case pattern) returns a 400 or 404 error
- Date range with malformed date strings returns a validation error
- Calling without a valid X-PAYMENT header returns HTTP 402 with USDC payment requirements on Base
- Slug not found in the catalog returns a 404
- Very large date ranges or hourly granularity over long periods may return sparse or truncated data

## How this service works

Paid data APIs for AI agents: prediction-market analytics, weather intelligence, weather×market edge signals, and SEC/gov data. Paid endpoints use the x402 protocol (HTTP 402 + USDC on Base): call without payment to receive requirements, retry with an X-PAYMENT header. Machine-readable catalog: /llms.txt. Per-endpoint docs: /docs/{id}.

## Output

A time-series array of historical probability or price records for the specified prediction market slug, bucketed by the requested granularity (hourly or daily), covering the requested date range. Each data point typically includes a timestamp and the market probability or price at that time.

## 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"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "slug"
     ],
     "properties": {
      "slug": {
       "type": "string",
       "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "to": {
       "type": "string",
       "format": "date",
       "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
      },
      "from": {
       "type": "string",
       "format": "date",
       "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
      },
      "granularity": {
       "enum": [
        "hour",
        "day"
       ],
       "type": "string",
       "default": "day"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-factory-historical-prediction-market-data-ba3c2834/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-factory.com](https://www.zero.xyz/host/x402-factory.com/llms.txt)
