Skip to content

Prediction Market Data API

GET/v1/predictiondata/resolved

Resolved markets, newest first, with the winning outcome, resolution time and the winner's last traded price before resolution. Refreshes every 5 minutes.

Price

$0.01/ call

Edge cache

150s

Uptime 24h

100.00%

p95

822ms

MCP tool

predictiondata_resolved

The Prediction Market Data API provides access to prediction market prices, implied probabilities, volumes, movers, resolutions, and history. Data is derived from public Polygon chain data. Payment options include pay per request in USDC over x402 or using an API key. The API offers a GET endpoint for recently resolved markets, returning the winning outcome, resolution time, and last traded price.

Parameters

NameInTypeDescription
limit query integer = 20
category query string

Code

curl
# 1. No key, no payment: the gateway answers 402 with the price
curl -i "https://api.realtimeapi.ai/v1/predictiondata/resolved"

# 2. Pay: retry with a signed x402 payment (any x402 client builds this header)
curl "https://api.realtimeapi.ai/v1/predictiondata/resolved" -H "PAYMENT-SIGNATURE: $X402_PAYMENT"
TypeScript · @x402/fetch
// npm i @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = x402Client.fromConfig({ schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(privateKeyToAccount(PRIVATE_KEY)) }] });
const pay = wrapFetchWithPayment(fetch, client);
const data = await (await pay("https://api.realtimeapi.ai/v1/predictiondata/resolved")).json();
console.log(data);
Python · x402
# pip install x402 eth-account requests
from eth_account import Account
from x402.clients.requests import x402_requests

session = x402_requests(Account.from_key(PRIVATE_KEY))
print(session.get("https://api.realtimeapi.ai/v1/predictiondata/resolved").json())
With an API key
curl "https://api.realtimeapi.ai/v1/predictiondata/resolved" -H "X-API-Key: $RTAPI_KEY"

Frequently asked questions

What data is provided?

Prediction market prices, implied probabilities, volumes, movers, resolutions, and history

How is data derived?

From public Polygon chain data (Polymarket exchange contracts)

What are the payment options?

Pay per request in USDC over x402 or use an API key

Get a free key

1,000 calls a month across every feed. Who is setting it up?

No key needed at all: agents can pay per call in USDC with x402.