# x402stock Prediction Markets API

> x402stock Prediction Markets API is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-15).

Returns live implied probabilities for prediction market outcomes decoded from Polymarket's CTF Exchange V2 on-chain events (Polygon ledger), including volume, VWAP, and trade metadata.

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/prediction-markets
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-prediction-markets-api-fd6d5712
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Qowo9Z8Q35oLdW5PI77kM

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 x402stock-prediction-markets-api-fd6d5712
```

Example prompt: What are the current implied probabilities on active Polymarket prediction markets — specifically the top markets by volume today, including their VWAP and how many trades happened today?

## When to prefer this

Choose this endpoint when you need on-chain-verified prediction market probabilities sourced directly from Polygon ledger events rather than a centralized Polymarket API. Ideal for agents that need trustless, independently decoded market sentiment data for political, economic, or event-driven decisions. Useful when building financial analysis workflows that incorporate crowd-sourced probability signals alongside macro data from the same x402stock ecosystem.

## Known failure modes

- Stale data if the Polygon indexer cursor is lagging behind the chain tip
- Empty markets array if no trades have been indexed recently
- Partial data if only neg-risk or only standard exchange events are available
- Payment failure (402) if USDC funds are insufficient on Base
- Malformed response if indexer state is corrupted or being rebuilt

## How this service works

Use to see where prediction-market money is flowing: the most recently traded Polymarket outcome tokens with implied probability (last on-chain price), today's VWAP and USD volume, and indexed totals — decoded by our own indexer from CTF Exchange V2 events on the public Polygon ledger, not from any Polymarket API. `?limit=` up to 100. From x402stock, a market & economic data API (x402, USDC).

## Output

A JSON object containing a list of prediction markets with their titles, implied probabilities (USD per outcome token), VWAP for today, volume in USD (today and all-time indexed), number of matched trades, condition IDs, token IDs, last block updated, and indexer cursor metadata. Data is sourced from decoded CTF Exchange V2 OrdersMatched on-chain events on Polygon, not from Polymarket's own API.

## Example request

```json
{
 "properties": "volume,vwap,trades"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "Implied probabilities decoded from CTF Exchange V2 OrdersMatched events on the public Polygon ledger (both standard and neg-risk exchanges). Not from any Polymarket API. Prices are USD per outcome token = implied probability.",
  "as_of": "2026-06-08T13:02:11.000Z",
  "count": 1,
  "venue": "polymarket",
  "source": "x402stock",
  "indexer": {
   "tokens_tracked": 412,
   "cursor_neg_risk": 61234401,
   "cursor_standard": 61234567
  },
  "markets": [
   {
    "title": "Will Donald Trump win the 2024 US Presidential Election?",
    "neg_risk": false,
    "token_id": "21742633143463906290569050155826241533067272736897614950488156847949938836455",
    "last_side": "buy",
    "last_block": 61234560,
    "updated_at": "2026-06-08T12:58:40.000Z",
    "vwap_today": 0.938,
    "condition_id": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
    "matches_today": 9123,
    "matches_indexed": 88123,
    "volume_usd_today": 1842310.55,
    "volume_usd_indexed": 24310221.07,
    "implied_probability": 0.945
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-prediction-markets-api-fd6d5712/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.xyz](https://www.zero.xyz/host/x402stock.xyz/llms.txt)
