# StatePulse API - Prediction Market Odds

> StatePulse API - Prediction Market Odds is a paid API for AI agents from statepulse-api.hahavoid0.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Returns live prediction market contract prices and odds for a given political or event-based market query

## Facts

- Endpoint: POST https://statepulse-api.hahavoid0.workers.dev/prediction/odds
- 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/statepulse-api-prediction-market-odds-af11631e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FjPYg3np-a2hBbBmBq_LQ

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 statepulse-api-prediction-market-odds-af11631e -d '<json body>'
```

Example prompt: What are the current live prediction market odds for the U.S. General Election — specifically the contract prices for each party and how confident the market is?

## When to prefer this

Use this endpoint when an agent needs live, pay-per-call prediction market prices for political or event-based outcomes without requiring account setup. Ideal for single on-demand lookups via x402 micropayments on Base when you need implied probabilities and market confidence in one call.

## Known failure modes

- Market not supported: 'supported' field returns false with no contract data
- Ambiguous query returns low-confidence results or empty contracts array
- Malformed POST body causes 400 error
- Payment not completed via x402 results in 402 Payment Required
- Network timeout from Cloudflare Worker due to upstream data latency

## How this service works

Retrieves live betting market prices and contract odds for global geopolitical events using PredictIt.

## Output

A JSON object containing the market name, an array of contracts each with a name and price (e.g. 0.52 = 52% implied probability), a 'supported' boolean indicating whether the query is handled, and a 'confidence' field (e.g. 'high') reflecting data reliability.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "market_id": {
       "type": "number",
       "examples": [
        12345
       ],
       "description": "Optional Polymarket market ID"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "contracts": [
    {
     "name": "Democratic Party",
     "price": 0.52
    }
   ],
   "market_name": "U.S. General Election Outcome"
  },
  "supported": true,
  "confidence": "high"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/statepulse-api-prediction-market-odds-af11631e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from statepulse-api.hahavoid0.workers.dev](https://www.zero.xyz/host/statepulse-api.hahavoid0.workers.dev/llms.txt)
