# HostDeFi Polymarket Prediction History

> HostDeFi Polymarket Prediction History is a paid API for AI agents from rpc.hostdefi.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-01).

Returns historical probability time-series data for a given Polymarket prediction market identified by its conditionId

## Facts

- Endpoint: GET https://rpc.hostdefi.com/api/v1/x402/predict/history?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hostdefi-polymarket-prediction-history-3870530e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_J4QeAh9hE_fvZ4wFTwnLq

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 hostdefi-polymarket-prediction-history-3870530e
```

Example prompt: Can you pull the historical probability data for the Polymarket market with condition ID 0xabc123def456 so I can see how the odds changed over time?

## When to prefer this

Choose this endpoint when you need historical probability time-series data for a specific Polymarket prediction market and have the conditionId on hand. It is useful for charting odds evolution, backtesting, and pre-trade research. Prefer it over manual Polymarket API scraping when you need a simple paid API call with structured output.

## Known failure modes

- Invalid or unknown marketId returns empty result or error
- Missing required marketId query parameter may return a 400 or empty response
- Network or RPC node downtime causes endpoint unavailability
- Polymarket market not indexed yet returns no data
- Payment failure (x402) if USDC not provided correctly blocks the request

## How this service works

HostDeFi is a Solana DEX with a free token safety scanner. Best-route swaps through Jupiter, EVM trading across 7 chains, native bridging, and live token risk grades. No KYC, 1% flat fee.

## Output

Returns a JSON object with ok status, a count of data points, the market title, an array of [timestamp, yes-probability, no-probability] tuples, the source (polymarket), and the market ID. Example: {ok:true, count:120, title:'Will it settle?', points:[[0,0.62,0.39]], source:'polymarket', marketId:'...'}

## 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",
     "properties": {
      "marketId": {
       "type": "string",
       "description": "Polymarket market id (conditionId, as listed by /v1/x402/predict/markets)"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "count": 120,
  "title": "Will it settle?",
  "points": [
   [
    0,
    0.62,
    0.39
   ]
  ],
  "source": "polymarket",
  "marketId": "…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hostdefi-polymarket-prediction-history-3870530e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rpc.hostdefi.com](https://www.zero.xyz/host/rpc.hostdefi.com/llms.txt)
