# HostDeFi Polymarket Prediction Market Price History

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

Returns historical price/probability time-series data for a specific Polymarket prediction market identified by its conditionId.

## Facts

- Endpoint: GET https://hostdefi.com/api/v1/x402/predict/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/hostdefi-polymarket-prediction-market-price-history-383371cc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xLlMCGJcsUhyl7JQWPt56

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-market-price-history-383371cc
```

Example prompt: Can you pull up the full probability history for Polymarket market 0xabc123... so I can see how the odds have shifted over time?

## When to prefer this

Use this endpoint when you need historical probability time-series data for a specific Polymarket prediction market by conditionId, especially within a DeFi/crypto context where you are already using HostDeFi for swap or trading functionality. Prefer this over direct Polymarket API access when operating in an x402 micropayment environment or when you need aggregated DeFi + prediction market data in one ecosystem.

## Known failure modes

- Invalid or unknown marketId returns an error or empty result
- Missing required marketId query parameter may return a 400 or empty response
- Market not yet resolved or very new may return limited historical points
- Payment failure (x402) blocks access if USDC payment is not processed
- Rate limiting or network issues may cause timeouts

## How this service works

HostDeFi is a non-custodial Solana DEX. Best-route swaps through Jupiter, EVM trading across 7 chains, native bridging, and live token risk grades. No KYC, no accounts, no custody.

## 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 data source (Polymarket), and the market conditionId.

## 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-market-price-history-383371cc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hostdefi.com](https://www.zero.xyz/host/hostdefi.com/llms.txt)
