Skip to content

Prediction Markets API

Real-time prediction market data via Predexon. 58 endpoints across 11 categories: Polymarket (26), Kalshi (3), dFlow (3), Binance Futures (2), Cross-Venue Matching (8), Sports (4), Limitless/Opinion/Predict.Fun (6), UMA Oracle (2), Wallet Identity (3).

Base URL: https://api.jarvisclaw.ai/v1/marketplace/prediction

Surf also has prediction data

The Crypto Data (Surf) API includes 17 prediction market endpoints under /v1/marketplace/surf/prediction-market/* at $0.0075/call. This Predexon service is a dedicated prediction-only provider with more endpoints (58 vs 17), deeper data (orderbooks, candlesticks, leaderboards), and lower pricing ($0.001/call GET).

Pricing

Endpoint TypePriceDescription
GET endpoints$0.001/requestMarket listings, events, pricing, candlesticks, volume
POST / Wallet$0.005/requestWallet positions, PnL, identity queries, cross-venue search

All Endpoints (58)

Polymarket (26 endpoints)

EndpointDescription
GET /polymarket/marketsList active markets with filtering and pagination
GET /polymarket/market/Get single market details by condition ID
GET /polymarket/eventsList events (grouped markets)
GET /polymarket/event/Get event details by slug
GET /polymarket/categoriesList all available categories
GET /polymarket/pricing/Current best bid/ask pricing
GET /polymarket/pricing/history/Historical price snapshots
GET /polymarket/candlesticks/OHLCV candlestick data
GET /polymarket/volume/Volume history
GET /polymarket/volume/aggregateAggregate platform volume stats
GET /polymarket/orderbook/Full order book depth
GET /polymarket/trades/Recent trades list
GET /polymarket/trades/liveLive trade feed (most recent across all markets)
GET /polymarket/positions/Wallet open positions
GET /polymarket/positions/history/Historical position changes
GET /polymarket/pnl/Wallet realized + unrealized PnL
GET /polymarket/wallet/Combined wallet summary (positions + PnL)
GET /polymarket/leaderboardTop traders by PnL
GET /polymarket/leaderboard/volumeTop traders by volume
GET /polymarket/activity/Recent wallet activity (buys/sells/redemptions)
GET /polymarket/rewards/Liquidity rewards earned
GET /polymarket/related/Related markets by topic
GET /polymarket/comments/Market comments/discussion
GET /polymarket/resolution/Resolution details (for resolved markets)
GET /polymarket/liquidity/Liquidity provider stats
GET /polymarket/statsPlatform-wide statistics

Kalshi (3 endpoints)

EndpointDescription
GET /kalshi/marketsList Kalshi markets with category/status filter
GET /kalshi/market/Get market details by ticker
GET /kalshi/eventsList Kalshi events

dFlow (3 endpoints)

EndpointDescription
GET /dflow/marketsList dFlow prediction markets
GET /dflow/market/Get dFlow market details
GET /dflow/orderbook/dFlow order book

Binance Futures (2 endpoints)

EndpointDescription
GET /binance/long-shortLong/short ratio for futures pairs
GET /binance/open-interestOpen interest history

Cross-Venue Matching (8 endpoints)

EndpointDescription
GET /markets/searchSearch across all venues by keyword
GET /markets/trendingTrending markets across all venues
GET /markets/newNewly created markets
GET /markets/resolving-soonMarkets resolving within 24-72h
GET /markets/highest-volumeHighest volume markets cross-venue
GET /markets/compare/Compare pricing across venues for same topic
GET /markets/categoriesUnified category list across all venues
GET /markets/arbitragePrice discrepancies between venues

Sports (4 endpoints)

EndpointDescription
GET /sports/marketsSports prediction markets (all venues)
GET /sports/eventsUpcoming sporting events with markets
GET /sports/leaguesSupported leagues and sports
GET /sports/liveLive in-play markets

Limitless / Opinion / Predict.Fun (6 endpoints)

EndpointDescription
GET /limitless/marketsList Limitless markets
GET /limitless/market/Limitless market details
GET /opinion/marketsList Opinion markets
GET /opinion/market/Opinion market details
GET /predictfun/marketsList Predict.Fun markets
GET /predictfun/market/Predict.Fun market details

UMA Oracle (2 endpoints)

EndpointDescription
GET /uma/assertionsUMA optimistic oracle assertions
GET /uma/disputesActive UMA disputes

Wallet Identity (3 endpoints)

EndpointDescription
GET /wallet/identity/Resolve wallet to known trader identity
GET /wallet/portfolio/Cross-venue prediction portfolio
GET /wallet/history/Trade history across all venues

Detailed Endpoint Reference

GET /polymarket/markets

List active Polymarket prediction markets with filtering and pagination.

Parameters

ParameterTypeRequiredDescription
limitintegerNoResults per page. Default: 20, Max: 100
offsetintegerNoPagination offset. Default: 0
categorystringNoFilter: politics, crypto, sports, science, culture, business, tech
statusstringNoFilter: active, resolved, all. Default: active
sortstringNoSort by: volume, liquidity, newest, ending_soon. Default: volume

Response

json
{
  "markets": [
    {
      "id": "0x1234abcd...",
      "question": "Will AI pass the Turing test by 2027?",
      "yes_price": 0.72,
      "no_price": 0.28,
      "volume": 1250000,
      "liquidity": 340000,
      "end_date": "2027-12-31",
      "category": "tech",
      "created_at": "2025-06-01T10:00:00Z"
    }
  ],
  "total": 1432
}

GET /polymarket/wallet/

Get wallet positions and PnL for a Polymarket address.

Parameters

ParameterTypeRequiredDescription
addressstringYesEthereum wallet address (0x-prefixed, path parameter)

Response

json
{
  "address": "0xAbC123def456...",
  "positions": [
    {
      "market_id": "0x1234abcd...",
      "question": "Will AI pass the Turing test by 2027?",
      "side": "yes",
      "shares": 500,
      "avg_price": 0.65,
      "current_price": 0.72,
      "unrealized_pnl": 35.00
    }
  ],
  "total_value": 2450.00,
  "realized_pnl": 180.50,
  "open_positions": 3
}

GET /kalshi/markets

List active Kalshi prediction markets.

Parameters

ParameterTypeRequiredDescription
limitintegerNoResults per page. Default: 20, Max: 100
offsetintegerNoPagination offset. Default: 0
categorystringNoFilter: economics, politics, weather, tech, finance, sports
statusstringNoMarket status: open, closed, settled. Default: open
series_tickerstringNoFilter by series (e.g., KXBTC, KXINX, KXFED)

Response

json
{
  "markets": [
    {
      "ticker": "KXUSRECESSION-26",
      "title": "US recession in 2026?",
      "yes_price": 0.28,
      "no_price": 0.72,
      "volume": 4200000,
      "close_time": "2026-12-31T23:59:00Z",
      "category": "economics"
    }
  ],
  "total": 847
}

Search for markets across all providers by keyword or topic.

Parameters

ParameterTypeRequiredDescription
qstringYesSearch query string
providersstringNoComma-separated: polymarket, kalshi, dflow, limitless. Default: all
limitintegerNoMax results. Default: 20, Max: 50
statusstringNoFilter by market status

Response

json
{
  "results": [
    {
      "provider": "polymarket",
      "id": "0x5678efgh...",
      "question": "Will Bitcoin exceed $200K by end of 2026?",
      "yes_price": 0.41,
      "volume": 3800000
    },
    {
      "provider": "kalshi",
      "ticker": "KXBTC-200K-26",
      "title": "Bitcoin above $200K before 2027?",
      "yes_price": 0.38,
      "volume": 1200000
    }
  ],
  "total": 14
}

GET /markets/arbitrage

Find price discrepancies for the same topic across different venues.

Response

json
{
  "opportunities": [
    {
      "topic": "Bitcoin above $200K by 2027",
      "polymarket_yes": 0.41,
      "kalshi_yes": 0.38,
      "spread": 0.03,
      "polymarket_id": "0x5678efgh...",
      "kalshi_ticker": "KXBTC-200K-26"
    }
  ]
}

GET /polymarket/leaderboard

Top traders ranked by realized PnL.

Parameters

ParameterTypeRequiredDescription
periodstringNoTime period: 24h, 7d, 30d, all. Default: 30d
limitintegerNoNumber of traders. Default: 25, Max: 100

Response

json
{
  "traders": [
    {
      "address": "0xabc...",
      "pnl": 125000.50,
      "volume": 2400000,
      "win_rate": 0.68,
      "trades": 342
    }
  ],
  "period": "30d"
}

Errors

HTTP CodeError CodeDescriptionResolution
400invalid_addressWallet address format is invalidUse 0x + 40 hex characters
404market_not_foundMarket ID does not exist or has been delistedFetch /markets to get current active IDs
404market_closedMarket has resolved and is no longer activeCheck end_date field; query active markets
429rate_limitedToo many requestsMax 100 req/min per key

Error Response Format

json
{
  "error": {
    "code": "market_not_found",
    "message": "No market found with ID '0x123...'. It may have been delisted or resolved."
  }
}

Code Examples

bash
# List Polymarket markets (politics category)
curl "https://api.jarvisclaw.ai/v1/marketplace/prediction/polymarket/markets?limit=5&category=politics" \
  -H "Authorization: Bearer sk-your-api-key"

# Get wallet positions and PnL
curl "https://api.jarvisclaw.ai/v1/marketplace/prediction/polymarket/wallet/0xAbC123def456" \
  -H "Authorization: Bearer sk-your-api-key"

# List Kalshi markets (economics category)
curl "https://api.jarvisclaw.ai/v1/marketplace/prediction/kalshi/markets?limit=5&category=economics" \
  -H "Authorization: Bearer sk-your-api-key"

# Search markets across all providers
curl "https://api.jarvisclaw.ai/v1/marketplace/prediction/markets/search?q=bitcoin+2026&providers=polymarket,kalshi" \
  -H "Authorization: Bearer sk-your-api-key"

# Get cross-venue arbitrage opportunities
curl "https://api.jarvisclaw.ai/v1/marketplace/prediction/markets/arbitrage" \
  -H "Authorization: Bearer sk-your-api-key"

# Polymarket leaderboard (30d)
curl "https://api.jarvisclaw.ai/v1/marketplace/prediction/polymarket/leaderboard?period=30d&limit=10" \
  -H "Authorization: Bearer sk-your-api-key"
python
from jarvisclaw import MarketplaceClient

client = MarketplaceClient(api_key="sk-your-api-key")

# List Polymarket markets
markets = client.call("prediction", "/polymarket/markets", method="GET", params={
    "limit": 10,
    "category": "politics",
})
for m in markets["markets"]:
    print(f"{m['question']}: YES {m['yes_price']:.0%} / NO {m['no_price']:.0%}")

# Get wallet PnL
wallet = client.call("prediction", "/polymarket/wallet/0xAbC123def456", method="GET")
print(f"Total PnL: ${wallet['realized_pnl']:.2f}")

# List Kalshi markets
kalshi = client.call("prediction", "/kalshi/markets", method="GET", params={
    "limit": 10,
    "category": "economics",
})
for m in kalshi["markets"]:
    print(f"{m['title']}: YES {m['yes_price']:.0%}")

# Search across providers
results = client.call("prediction", "/markets/search", method="GET", params={
    "q": "bitcoin 2026",
    "providers": "polymarket,kalshi",
    "limit": 10,
})
for r in results["results"]:
    print(f"[{r['provider']}] {r.get('question', r.get('title'))}: YES {r['yes_price']}")

# Arbitrage opportunities
arb = client.call("prediction", "/markets/arbitrage", method="GET")
for opp in arb["opportunities"]:
    print(f"{opp['topic']}: spread {opp['spread']:.1%}")
python
from jarvisclaw import MarketplaceClient

# Base chain (EVM) — pays per-call via USDC
client = MarketplaceClient(private_key="0x<evm-private-key>")

# Or Solana
# client = MarketplaceClient(private_key="<solana-bs58-keypair>")

# List Polymarket markets
markets = client.call("prediction", "/polymarket/markets", method="GET", params={
    "limit": 10,
    "category": "crypto",
})
for m in markets["markets"]:
    print(f"{m['question']}: YES {m['yes_price']:.0%} / NO {m['no_price']:.0%}")

# Get wallet PnL
wallet = client.call("prediction", "/polymarket/wallet/0xAbC123def456", method="GET")
print(f"Total PnL: ${wallet['realized_pnl']:.2f}")

# List Kalshi markets
kalshi = client.call("prediction", "/kalshi/markets", method="GET", params={
    "limit": 10,
    "category": "economics",
})
for m in kalshi["markets"]:
    print(f"{m['title']}: YES {m['yes_price']:.0%}")

# Search across all venues
results = client.call("prediction", "/markets/search", method="GET", params={
    "q": "US election 2026",
    "providers": "polymarket,kalshi",
    "limit": 10,
})
for r in results["results"]:
    print(f"[{r['provider']}] YES {r['yes_price']}")
go
package main

import (
	"context"
	"fmt"
	jc "github.com/api-jarvisclaw/go-sdk"
)

func main() {
	ctx := context.Background()
	mc, _ := jc.NewMarketplaceClient(jc.WithAPIKey("sk-your-api-key"))

	// List Polymarket markets
	markets, _ := mc.Call(ctx, "prediction", "/polymarket/markets", jc.WithParams(map[string]any{
		"limit":    10,
		"category": "politics",
	}))
	fmt.Println("Polymarket markets:", markets)

	// Get wallet positions
	wallet, _ := mc.Call(ctx, "prediction", "/polymarket/wallet/0xAbC123def456", nil)
	fmt.Println("Wallet:", wallet)

	// List Kalshi markets
	kalshi, _ := mc.Call(ctx, "prediction", "/kalshi/markets", jc.WithParams(map[string]any{
		"limit":    10,
		"category": "economics",
	}))
	fmt.Println("Kalshi markets:", kalshi)

	// Cross-venue search
	results, _ := mc.Call(ctx, "prediction", "/markets/search", jc.WithParams(map[string]any{
		"q":         "bitcoin 2026",
		"providers": "polymarket,kalshi",
		"limit":     10,
	}))
	fmt.Println("Search results:", results)
}
go
package main

import (
	"context"
	"fmt"
	jc "github.com/api-jarvisclaw/go-sdk"
)

func main() {
	ctx := context.Background()
	// x402 Agent wallet — pays per-call via USDC on Base
	mc, _ := jc.NewMarketplaceClient(jc.WithPrivateKey("0x<evm-private-key>"))

	// List Polymarket markets
	markets, _ := mc.Call(ctx, "prediction", "/polymarket/markets", jc.WithParams(map[string]any{
		"limit":    10,
		"category": "politics",
	}))
	fmt.Println("Polymarket markets:", markets)

	// Get wallet positions
	wallet, _ := mc.Call(ctx, "prediction", "/polymarket/wallet/0xAbC123def456", nil)
	fmt.Println("Wallet:", wallet)

	// List Kalshi markets
	kalshi, _ := mc.Call(ctx, "prediction", "/kalshi/markets", jc.WithParams(map[string]any{
		"limit":    10,
		"category": "economics",
	}))
	fmt.Println("Kalshi markets:", kalshi)

	// Arbitrage opportunities
	arb, _ := mc.Call(ctx, "prediction", "/markets/arbitrage", nil)
	fmt.Println("Arbitrage:", arb)
}

Limitations

  • Read-only — cannot place orders or execute trades
  • No WebSocket — poll endpoints for updates; data refreshes every ~5s
  • Ethereum addresses only — wallet lookups require full 0x-prefixed addresses, ENS not resolved
  • Sports markets delayed — may lag up to 60s due to upstream rate limits
  • Cross-venue matching best-effort — not all markets have counterparts on other venues
  • Price format differs by venue — Polymarket: decimals (0.00-1.00), Kalshi: cents (0-100)
  • Rate limit — 100 requests/minute per API key
  • Leaderboard cache — updated every 15 minutes, not real-time

Pay per call. No subscription. No rate limits.