API
Diverge API
Programmatic access to cross-platform prediction market data. Available on the Enterprise plan.
Authentication
All requests require an API key passed via the Authorization header.
curl https://api.diverge.market/api/v1/markets \ -H "Authorization: Bearer dvg_your_api_key"
Rate Limits
REST endpoints
1,000 req/min
WebSocket connections
10 concurrent
Base URL
api.diverge.market
Endpoints
GET
/api/v1/marketsList all tracked markets. Filter by platform, category, or status.
Query Parameters
platformstring"polymarket" or "kalshi"categorystring"politics", "crypto", "sports", etc.statusstring"active", "resolved", "all"limitnumberResults per page (default 50, max 200)offsetnumberPagination offsetExample Response
{
"markets": [
{
"id": "mkt_8f3a2b",
"title": "Will Bitcoin exceed $150k by end of 2026?",
"platform": "polymarket",
"category": "crypto",
"status": "active",
"lastPrice": 0.42,
"volume": 2847593,
"updatedAt": "2026-03-05T23:58:00Z"
}
],
"total": 59234,
"limit": 50,
"offset": 0
}GET
/api/v1/markets/:idGet full market details including metadata and recent price history.
Query Parameters
historystringPrice history range: "1d", "7d", "30d", "all"Example Response
{
"id": "mkt_8f3a2b",
"title": "Will Bitcoin exceed $150k by end of 2026?",
"platform": "polymarket",
"category": "crypto",
"status": "active",
"lastPrice": 0.42,
"volume": 2847593,
"createdAt": "2025-11-15T10:00:00Z",
"updatedAt": "2026-03-05T23:58:00Z",
"priceHistory": [
{ "timestamp": "2026-03-05T23:00:00Z", "price": 0.41 },
{ "timestamp": "2026-03-05T23:30:00Z", "price": 0.42 }
]
}GET
/api/v1/matchesCross-platform matched markets — identical events listed on both Polymarket and Kalshi.
Query Parameters
categorystringFilter by categoryminDivergencenumberMinimum price divergence (0-1)limitnumberResults per page (default 50)Example Response
{
"matches": [
{
"id": "match_4c9e1a",
"title": "Will Bitcoin exceed $150k by end of 2026?",
"polymarket": {
"id": "mkt_8f3a2b",
"price": 0.42,
"volume": 2847593
},
"kalshi": {
"id": "mkt_k7d3f1",
"price": 0.38,
"volume": 1205847
},
"divergence": 0.04,
"matchConfidence": 0.94,
"updatedAt": "2026-03-05T23:58:00Z"
}
],
"total": 3847
}GET
/api/v1/arbsActive arbitrage opportunities — matched markets with profitable price differences.
Query Parameters
minSpreadnumberMinimum spread percentage (default 2)sortBystring"spread", "volume", "updatedAt"limitnumberResults per page (default 20)Example Response
{
"arbs": [
{
"id": "arb_2f8c4d",
"title": "Democrats win 2026 midterms",
"buyPlatform": "kalshi",
"buyPrice": 0.35,
"sellPlatform": "polymarket",
"sellPrice": 0.42,
"spread": 0.07,
"spreadPct": 7.0,
"combinedVolume": 5200000,
"detectedAt": "2026-03-05T23:45:00Z"
}
],
"total": 23
}GET
/api/v1/prices/:marketIdFull price snapshot history for a specific market.
Query Parameters
fromstringStart date (ISO 8601)tostringEnd date (ISO 8601)intervalstring"1m", "5m", "1h", "1d"Example Response
{
"marketId": "mkt_8f3a2b",
"platform": "polymarket",
"prices": [
{ "timestamp": "2026-03-05T00:00:00Z", "price": 0.39, "volume": 42850 },
{ "timestamp": "2026-03-05T01:00:00Z", "price": 0.40, "volume": 38200 },
{ "timestamp": "2026-03-05T02:00:00Z", "price": 0.41, "volume": 51300 }
],
"interval": "1h"
}GET
/api/v1/accuracyPlatform accuracy scores — Brier scores overall and by category.
Query Parameters
categorystringFilter by categoryExample Response
{
"overall": {
"polymarket": { "brierScore": 0.103, "resolved": 18542 },
"kalshi": { "brierScore": 0.118, "resolved": 12847 }
},
"byCategory": [
{
"category": "politics",
"polymarket": { "brierScore": 0.089, "resolved": 4521 },
"kalshi": { "brierScore": 0.095, "resolved": 3847 }
}
]
}WebSocket
/api/v1/wsReal-time price updates and arbitrage alerts. Subscribe to specific markets or all arb events.
Options
subscribestring[]Channel names: "prices", "arbs", "markets"marketIdsstring[]Filter price updates to specific marketsMessages
// Subscribe message
{ "type": "subscribe", "channels": ["arbs", "prices"] }
// Price update event
{
"type": "price_update",
"marketId": "mkt_8f3a2b",
"platform": "polymarket",
"price": 0.43,
"previousPrice": 0.42,
"timestamp": "2026-03-05T23:59:30Z"
}
// Arb alert event
{
"type": "arb_alert",
"arbId": "arb_2f8c4d",
"title": "Democrats win 2026 midterms",
"spread": 0.07,
"spreadPct": 7.0,
"detectedAt": "2026-03-05T23:59:45Z"
}