Developer documentation
Build on
what happens next.
Market data. Trading. Real-time updates.
Your next idea, powered by the prediction API/SDK.
Predict the world in just a few lines.
Choose your starting point
Discover
Market data, at your fingertips.
Pull open markets, prices and order books directly into your app. All you need is an API key.
Explore market data// Print the open categories, each with its markets.
// Get an API key from the developer console: https://developers.predict.fun
const response = await fetch(
"https://api.predict.fun/v1/categories?status=OPEN&first=5&tagIds=4",
{ headers: { "x-api-key": "YOUR_API_KEY" } },
);
if (!response.ok) throw new Error(`Predict API error: ${response.status}`);
const { data: categories } = await response.json();
for (const category of categories) {
console.log(category.title);
for (const market of category.markets) {
console.log(` - ${market.title} (market ${market.id})`);
}
}Query categories and their markets
Built for your workflow
Give your agent a head start.
Keep the context close to the code.
Give it docs access, then have it bring your idea to life.