Skip to content

Prediction Market Data API

GET/v1/predictiondata/markets/{market_id}

Every outcome's last traded price (micro-USD) and implied probability (basis points), 24 hour volume and trades, status and resolution. market_id is a condition id, an outcome token id, or 'top' for the busiest live market. Refreshes every 15 seconds.

Price

$0.01/ call

Edge cache

Off

Uptime 24h

100.00%

p95

2.66s

The Prediction Market Data API provides real-time data on prediction market prices, implied probabilities, volumes, and more. Derived from public Polygon chain data, this API offers a range of data points, including last traded prices, 24 hour volumes, and resolution status. The API is accessible via a GET request and can be paid for per request in USDC or with an API key. Data is refreshed every 15 seconds.

Parameters

NameInTypeDescription
market_id* path string

Code

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

# 2. Pay: retry with a signed x402 payment (any x402 client builds this header)
curl "https://api.realtimeapi.ai/v1/predictiondata/markets/top" -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/markets/top")).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/markets/top").json())
With an API key
curl "https://api.realtimeapi.ai/v1/predictiondata/markets/top" -H "X-API-Key: $RTAPI_KEY"

Frequently asked questions

What data is available?

Prediction market prices, implied probabilities, volumes, and more.

How is the data sourced?

Public Polygon chain data (Polymarket exchange contracts).

How often is the data updated?

Every 15 seconds.

What are the payment options?

Pay per request in USDC or use an API key.

What is the price per request?

$0.010

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.