jupiter_prediction_events
List binary prediction events on real-world events from Polymarket or Kalshi. Filter by category, sort by volume or date, and include market data.
Instructions
List Jupiter prediction events — binary markets on real-world events. Filter by category, sort by volume or date, include market data.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "jupiter_prediction_events"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| provider | No | Data source (default: polymarket) | |
| includeMarkets | No | Include market data in response | |
| category | No | Filter: all, crypto, sports, politics, esports, culture, economics, tech | |
| sortBy | No | Sort field | |
| sortDirection | No | Sort order | |
| filter | No | Named filter: new (24h), live (active), trending | |
| start | No | Pagination start index | |
| end | No | Pagination end index |
Implementation Reference
- src/tools/prediction.ts:19-22 (handler)Handler function for the jupiter_prediction_events tool. Calls client.predictionEvents(args) and returns the result as JSON.
async (args) => { const result = await client.predictionEvents(args); return JSON.stringify(result, null, 2); }, - src/tools/prediction.ts:9-18 (schema)Zod schema defining input parameters for jupiter_prediction_events: provider (kalshi|polymarket), includeMarkets, category, sortBy, sortDirection, filter, start, end.
{ provider: z.enum(["kalshi", "polymarket"]).optional().describe("Data source (default: polymarket)"), includeMarkets: z.boolean().optional().describe("Include market data in response"), category: z.string().optional().describe("Filter: all, crypto, sports, politics, esports, culture, economics, tech"), sortBy: z.enum(["volume", "beginAt"]).optional().describe("Sort field"), sortDirection: z.enum(["asc", "desc"]).optional().describe("Sort order"), filter: z.enum(["new", "live", "trending"]).optional().describe("Named filter: new (24h), live (active), trending"), start: z.number().optional().describe("Pagination start index"), end: z.number().optional().describe("Pagination end index"), }, - src/tools/prediction.ts:5-24 (registration)Registration function registerPredictionTools which calls register() with name 'jupiter_prediction_events', description, schema, and handler.
export function registerPredictionTools(register: ToolRegistrar, client: JupiterClient) { register( "jupiter_prediction_events", "List Jupiter prediction events — binary markets on real-world events. Filter by category, sort by volume or date, include market data.", { provider: z.enum(["kalshi", "polymarket"]).optional().describe("Data source (default: polymarket)"), includeMarkets: z.boolean().optional().describe("Include market data in response"), category: z.string().optional().describe("Filter: all, crypto, sports, politics, esports, culture, economics, tech"), sortBy: z.enum(["volume", "beginAt"]).optional().describe("Sort field"), sortDirection: z.enum(["asc", "desc"]).optional().describe("Sort order"), filter: z.enum(["new", "live", "trending"]).optional().describe("Named filter: new (24h), live (active), trending"), start: z.number().optional().describe("Pagination start index"), end: z.number().optional().describe("Pagination end index"), }, async (args) => { const result = await client.predictionEvents(args); return JSON.stringify(result, null, 2); }, ); } - src/index.ts:26-26 (registration)Import of registerPredictionTools from ./tools/prediction.js for the MCP server entry point.
import { registerPredictionTools } from "./tools/prediction.js"; - src/index.ts:67-67 (registration)Invocation of registerPredictionTools with the MCP register function and JupiterClient instance.
registerPredictionTools(register, client); - src/client.ts:200-211 (helper)JupiterClient.predictionEvents() method that makes the HTTP GET request to /prediction/v1/events with optional query parameters.
async predictionEvents(params?: { provider?: "kalshi" | "polymarket"; includeMarkets?: boolean; category?: string; sortBy?: "volume" | "beginAt"; sortDirection?: "asc" | "desc"; filter?: "new" | "live" | "trending"; start?: number; end?: number; }) { return this.request("/prediction/v1/events", { params: params as any }); } - src/types.ts:4-9 (helper)ToolRegistrar type definition used by registerPredictionTools and all other tool registration functions.
export type ToolRegistrar = ( name: string, description: string, schema: Record<string, z.ZodType>, handler: (args: any) => Promise<string>, ) => void;