Prediction markets turn questions like "Will the Fed cut rates in September?" into a tradable price between 0 and 1 that reads as an implied probability. If you are building a screener, a research tool, or a dashboard, you want that data behind a clean API instead of scraping venue pages.
Elgon exposes a /predictions endpoint for exactly this shape of data. One important caveat up front, stated plainly: the prediction data Elgon returns is simulated sample data, tagged "source":"sandbox" in every response. It is designed for building and testing your integration end to end. Do not trade on it and do not report its numbers as real market odds. This guide shows how to query it with plain REST calls so your plumbing is ready the day you wire in a real feed.
How the endpoint works
Like every Elgon endpoint, /predictions is a single HTTP GET that returns JSON with permissive CORS headers. There is no SDK, no GraphQL, and no WebSocket — just a URL, a search term, and a key. Pass the public sandbox key to try it with no signup:
curl "https://elgonrpc.xyz/api/v1/predictions?q=fed&key=elgon_sandbox_pub"
The response wraps a list of markets in data, flags the source as sandbox, and includes a signed receipt:
{
"data": [
{
"id": "fed-cut-sep",
"question": "Fed cuts rates in September?",
"category": "macro",
"yesPrice": 0.62,
"noPrice": 0.38,
"volume": 1305720,
"closesAt": "2026-09-17T18:00:00Z"
}
],
"source": "sandbox",
"plan": "free",
"note": "Sandbox data — deterministic sample values, not real market odds."
}
Each market has a stable id, the question, a category, the current yesPrice and noPrice (which sum to 1 and read as implied probability), a volume, and a closesAt timestamp.
Fetching markets in Python
The whole client is one function around requests.get:
import requests
BASE = "https://elgonrpc.xyz/api/v1"
KEY = "elgon_sandbox_pub"
def predictions(q):
resp = requests.get(f"{BASE}/predictions", params={"q": q, "key": KEY})
resp.raise_for_status()
return resp.json()["data"]
# Sandbox data — for building against, not for trading
for m in predictions("fed"):
print(f'{m["question"]}: YES {m["yesPrice"]:.0%} on ${m["volume"]:,.0f} volume')
Fetching markets in TypeScript
The same call with fetch — runs in Node 18+ and in the browser:
const res = await fetch(
"https://elgonrpc.xyz/api/v1/predictions?q=election&key=elgon_sandbox_pub"
);
const { data, source } = await res.json(); // source: "sandbox"
for (const m of data) {
console.log(`${m.question}: YES ${m.yesPrice} / NO ${m.noPrice}`);
}
Watching for odds changes
Elgon has no WebSocket, no subscription API, and no historical-bars endpoint. To track how a market's implied probability moves, poll the endpoint on an interval and record each snapshot yourself — that is how you build your own history:
import time
while True:
for m in predictions("fed"):
ts = int(time.time())
print(f'{ts}\t{m["id"]}\tYES {m["yesPrice"]:.3f}')
time.sleep(3600) # hourly snapshot — respect the rate limit
The free tier allows 60 requests per minute; Growth raises it to 600/min for $350/month. An hourly or per-minute poll sits comfortably inside either.
What Elgon does and does not offer here
Does: a single REST GET that returns a searchable list of prediction-market snapshots with yes/no prices, volume, and close dates, plus a verifiable receipt on every response.
Does not: real venue data (the values are sandbox-simulated), Polymarket- or Kalshi-specific order books, real-time streaming, GraphQL, or historical candles. If you need live venue data, integrate that venue's own API; Elgon's role here is a stable, honest sandbox to build against.
FAQ
Is the prediction data real?
No. It is simulated sample data, tagged "source":"sandbox" in every response. Use it to build and test; do not trade or report on it as real.
Does Elgon stream live odds over WebSocket?
No. Every endpoint is a plain HTTP GET. To follow a market, poll on an interval.
Do I need an API key?
You can use the public sandbox key elgon_sandbox_pub with no signup. For your own key, mint a free one with a single POST /api/keys or from the dashboard.
Ready to build? Get your API key and read the full API docs.

