Skip to main content

TL;DR

Jupiter’s Prediction API lets you add prediction market trading to your Solana app. Users can trade on real-world event outcomes (sports, crypto, politics) with liquidity aggregated from Polymarket and Kalshi. The API handles order matching, position tracking, and settlement. Base URL: https://api.jup.ag/prediction/v1
Video walkthrough + source code: Watch the video walkthrough and grab the demo app source code on GitHub.

Prerequisites

  1. Get an API key at Portal
  2. All requests require the x-api-key header
  3. Users need JupUSD (or USDC) to trade
BETAThe Prediction Market API is currently in beta and subject to breaking changes. If you have feedback, reach out in Discord.

Quick start


When you need this

You’re building an app where users can:
  • Trade on event outcomes. “Will BTC hit $100k by end of 2026?”
  • Bet on sports, politics, or crypto. Binary YES/NO markets.
  • Build a prediction market frontend. Custom UI for trading.
  • Add speculation features. Let users put money on their predictions.
  • Track trading performance. Leaderboards, P&L history, profiles.
Common searches that lead here:
  • “prediction market api solana”
  • “binary options solana”
  • “bet on events solana api”
  • “polymarket on solana”

Why Jupiter

Building prediction markets from scratch requires:
  • Liquidity sourcing and market making
  • Order matching infrastructure
  • Settlement and payout systems
  • Real-world event data feeds
Jupiter handles all of this:
  • Aggregates liquidity from Polymarket and Kalshi.
  • Keeper network matches and fills orders.
  • On-chain settlement with guaranteed payouts.
  • No payout fees. Winners receive the full $1 per contract.
You get prediction market functionality without building the infrastructure.

How prediction markets work

Binary outcomes: Every market is YES or NO. “Will X happen?” → YES or NO. Contract pricing: Prices range from 0.01to0.01 to 0.99. Price = implied probability.
  • 70¢ YES price = market thinks 70% chance of YES
  • If you buy YES at 70¢ and YES wins, you profit 30¢ per contract
  • Losing contracts expire worthless
Settlement: When the event resolves, winning contracts pay out $1 each. No fees on payouts.

API reference

Base URL: https://api.jup.ag/prediction/v1

Code examples

Browse available events

Filter options:
  • category: all, crypto, sports, politics, esports, culture, economics, tech
  • filter: new (last 24h), live (in progress), trending
  • provider: polymarket (default), kalshi

Search for specific events

Create a buy order

Amount format: All USD values use native token units where 1,000,000 = $1.00.
  • depositAmount: '2000000' = $2.00
  • depositMint accepts USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) or JupUSD (JuprjznTrTSp2UFa3ZBUFgwdAmtZCq4MQCwysN55USD)

Get user positions

Claim winnings from a settled position


Response format

Event

Market

Position

Create order response

History event


Order lifecycle

  1. Create order: Call POST /orders → get unsigned transaction
  2. Sign & submit: User signs, you submit to Solana
  3. Keeper fills: Jupiter’s keeper network matches the order
  4. Position updates: Position reflects new contracts
  5. Market settles: When event resolves, result is recorded
  6. Claim payout: If position won, call /claim to withdraw

Common questions

JupUSD or USDC. Specify via depositMint parameter (defaults to USDC).
Check market.status === 'open'. A market with status open is actively trading.
You can close a position using DELETE /positions/{positionPubkey}, which sells all contracts. Unfilled orders that fail are closed automatically by the keeper network. Use GET /orders/status/{orderPubkey} to check if an order is pending, filled, or failed.
Polymarket (default) has more markets. Kalshi is US-regulated. Use the provider query param to switch.

Next steps