Documentation Index Fetch the complete documentation index at: https://dev.jup.ag/docs/llms.txt
Use this file to discover all available pages before exploring further.
BETA The Prediction Market API is currently in beta and subject to breaking changes as we continue to improve the product. If you have any feedback, please reach out in Discord .
This doc covers the social features of Jupiter Prediction Market, including user profiles, following system, leaderboards, and the global trade feed.
Prerequisite
To use social features, you need:
User Profiles
Use GET /profiles/{ownerPubkey} to retrieve a user’s prediction market statistics and performance metrics.
const traderPubkey = 'TRADER_WALLET_PUBLIC_KEY' ;
const response = await fetch (
`https://api.jup.ag/prediction/v1/profiles/ ${ traderPubkey } ` ,
{
headers: {
'x-api-key' : 'your-api-key'
}
}
);
const profile = await response . json ();
console . log ( profile );
Example response:
{
"ownerPubkey" : "TRADER_WALLET_PUBLIC_KEY" ,
"realizedPnlUsd" : "15000000" ,
"totalVolumeUsd" : "250000000" ,
"predictionsCount" : "45" ,
"correctPredictions" : "28" ,
"wrongPredictions" : "17" ,
"totalActiveContracts" : "150" ,
"totalPositionsValueUsd" : "85000000"
}
See all 10 lines
Field Description realizedPnlUsdTotal realized profit/loss in micro USD totalVolumeUsdTotal trading volume in micro USD predictionsCountTotal number of predictions made correctPredictionsNumber of winning predictions wrongPredictionsNumber of losing predictions totalActiveContractsCurrent open contract count totalPositionsValueUsdCurrent portfolio value in micro USD
P&L History
Use GET /profiles/{ownerPubkey}/pnl-history to retrieve time-series P&L data for charting.
Parameter Type Description intervalstring Time interval: 24h, 1w, or 1m countnumber Number of data points (default: 10)
const traderPubkey = 'TRADER_WALLET_PUBLIC_KEY' ;
const response = await fetch (
`https://api.jup.ag/prediction/v1/profiles/ ${ traderPubkey } /pnl-history?` +
new URLSearchParams ({
interval: '1w' ,
count: '12' // 12 weeks of data
}),
{
headers: {
'x-api-key' : 'your-api-key'
}
}
);
const pnlHistory = await response . json ();
Example response:
{
"ownerPubkey" : "TRADER_WALLET_PUBLIC_KEY" ,
"history" : [
{ "timestamp" : 1704067200 , "realizedPnlUsd" : "5000000" },
{ "timestamp" : 1704672000 , "realizedPnlUsd" : "7500000" },
{ "timestamp" : 1705276800 , "realizedPnlUsd" : "6800000" },
{ "timestamp" : 1705881600 , "realizedPnlUsd" : "12000000" },
{ "timestamp" : 1706486400 , "realizedPnlUsd" : "15000000" }
]
}
See all 10 lines
Trade Feed
Use GET /trades to retrieve recent trades across the platform. This provides a global activity feed of filled orders.
const response = await fetch (
'https://api.jup.ag/prediction/v1/trades' ,
{
headers: {
'x-api-key' : 'your-api-key'
}
}
);
const trades = await response . json ();
Example response:
{
"data" : [
{
"id" : 425993 ,
"ownerPubkey" : "trader-pubkey-1" ,
"marketId" : "market-456" ,
"message" : "trader-pubkey-1 bought Yes for SOL $500 by Q2 2026 at $0.72 ($18.00)" ,
"timestamp" : 1704067260 ,
"action" : "buy" ,
"side" : "yes" ,
"eventTitle" : "Will SOL reach $500?" ,
"marketTitle" : "SOL $500 by Q2 2026" ,
"amountUsd" : "18000000" ,
"priceUsd" : "720000" ,
"eventImageUrl" : "https://..." ,
"eventId" : "event-123"
},
{
"id" : 425992 ,
"ownerPubkey" : "trader-pubkey-2" ,
"marketId" : "market-012" ,
"message" : "trader-pubkey-2 sold No for BTC halving before April 2024 at $0.45 ($4.50)" ,
"timestamp" : 1704067200 ,
"action" : "sell" ,
"side" : "no" ,
"eventTitle" : "Bitcoin halving date" ,
"marketTitle" : "BTC halving before April 2024" ,
"amountUsd" : "4500000" ,
"priceUsd" : "450000" ,
"eventImageUrl" : "https://..." ,
"eventId" : "event-789"
}
]
}
See all 34 lines
Field Description idUnique trade identifier ownerPubkeyTrader’s wallet address marketIdMarket identifier messageHuman-readable trade summary timestampUnix timestamp (seconds) of the trade actionbuy or sellsideyes or nopriceUsdExecution price in micro USD amountUsdTotal trade value in micro USD eventTitleParent event title marketTitleMarket title eventImageUrlImage URL for the parent event eventIdParent event identifier
Leaderboards
Use GET /leaderboards to retrieve competitive rankings.
Parameter Type Description periodstring Time period: all_time, weekly, monthly metricstring Ranking metric: pnl, volume, win_rate limitnumber Number of results (1-100)
const response = await fetch (
'https://api.jup.ag/prediction/v1/leaderboards?' + new URLSearchParams ({
period: 'weekly' ,
metric: 'pnl' ,
limit: '10'
}),
{
headers: {
'x-api-key' : 'your-api-key'
}
}
);
const leaderboard = await response . json ();
Example response:
{
"data" : [
{
"ownerPubkey" : "top-trader-pubkey" ,
"realizedPnlUsd" : "50000000" ,
"totalVolumeUsd" : "500000000" ,
"predictionsCount" : 40 ,
"correctPredictions" : 30 ,
"wrongPredictions" : 10 ,
"winRatePct" : "75.00" ,
"period" : "weekly" ,
"periodStart" : "2026-02-24T00:00:00.000Z" ,
"periodEnd" : "2026-03-03T00:00:00.000Z"
},
{
"ownerPubkey" : "second-trader-pubkey" ,
"realizedPnlUsd" : "35000000" ,
"totalVolumeUsd" : "400000000" ,
"predictionsCount" : 55 ,
"correctPredictions" : 37 ,
"wrongPredictions" : 18 ,
"winRatePct" : "67.27" ,
"period" : "weekly" ,
"periodStart" : "2026-02-24T00:00:00.000Z" ,
"periodEnd" : "2026-03-03T00:00:00.000Z"
}
],
"summary" : {
"all_time" : {
"totalVolumeUsd" : "7009708479895" ,
"predictionsCount" : 31202
},
"weekly" : {
"totalVolumeUsd" : "186403707003" ,
"predictionsCount" : 971
},
"monthly" : {
"totalVolumeUsd" : "269887658105" ,
"predictionsCount" : 1743
}
}
}
See all 42 lines
Metric Description pnlRanked by realized profit/loss volumeRanked by total trading volume win_rateRanked by prediction accuracy
Use Cases
Analytics Dashboard
Combine leaderboards with profiles for competitive analysis:
// Get top performers
const topTraders = await fetch (
'https://api.jup.ag/prediction/v1/leaderboards?' + new URLSearchParams ({
period: 'monthly' ,
metric: 'pnl' ,
limit: '5'
}),
{ headers: { 'x-api-key' : 'your-api-key' } }
). then ( r => r . json ());
// Get detailed P&L history for top trader
const topTraderHistory = await fetch (
`https://api.jup.ag/prediction/v1/profiles/ ${ topTraders . data [ 0 ]. ownerPubkey } /pnl-history?` +
new URLSearchParams ({ interval: '1w' , count: '4' }),
{ headers: { 'x-api-key' : 'your-api-key' } }
). then ( r => r . json ());
console . log ( 'Top trader weekly P&L trend:' , topTraderHistory . history );
Summary
Feature Endpoint Description Profiles GET /profiles/{pubkey}User stats and performance P&L History GET /profiles/{pubkey}/pnl-historyTime-series P&L data Follow POST /follow/{pubkey}Follow a trader Unfollow DELETE /unfollow/{pubkey}Unfollow a trader Followers GET /followers/{pubkey}List followers Following GET /following/{pubkey}List who user follows Trade Feed GET /tradesGlobal recent trades Leaderboards GET /leaderboardsCompetitive rankings