Scan cross-venue prediction market arbitrage
curl --request GET \
--url https://api.darvas.app/v1/prediction-markets/arbitrage \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.darvas.app/v1/prediction-markets/arbitrage"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.darvas.app/v1/prediction-markets/arbitrage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"arbitrage_opportunities": [
{
"edge_percent": 4.5,
"combined_cost": 0.955,
"buy_yes_venue": "polymarket",
"buy_yes_price": 0.455,
"buy_no_venue": "kalshi",
"buy_no_price": 0.5,
"similarity": 0.72,
"min_liquidity": 18500,
"polymarket_market_id": "559651",
"kalshi_ticker": "FED-26DEC-CUT",
"polymarket_question": "Federal Reserve cuts rates in December 2026?",
"kalshi_question": "Federal Reserve cut rates December 2026 meeting?",
"polymarket_url": "https://polymarket.com/event/fed-rate-cut-december",
"kalshi_url": "https://kalshi.com/markets/FED-26DEC-CUT"
}
]
}{
"error": "VALIDATION_ERROR",
"message": "Send ticker or cik"
}{
"error": "UNAUTHORIZED",
"message": "The API key is not valid"
}{
"error": "PLAN_REQUIRED",
"message": "The account of this key has no active data API plan"
}{
"error": "NOT_FOUND",
"message": "No company has this ticker or CIK"
}{
"error": "RATE_LIMITED",
"message": "Too many requests"
}{
"error": "INTERNAL_ERROR",
"message": "Something went wrong"
}{
"error": "UNAVAILABLE",
"message": "The data service is unavailable"
}Prediction Markets
Cross-Venue Prediction Market Arbitrage API
Detect live YES/NO pricing discrepancies and cross-venue arbitrage spreads on matched binary contracts between Polymarket and Kalshi via API.
Scan cross-venue prediction market arbitrage
curl --request GET \
--url https://api.darvas.app/v1/prediction-markets/arbitrage \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.darvas.app/v1/prediction-markets/arbitrage"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.darvas.app/v1/prediction-markets/arbitrage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"arbitrage_opportunities": [
{
"edge_percent": 4.5,
"combined_cost": 0.955,
"buy_yes_venue": "polymarket",
"buy_yes_price": 0.455,
"buy_no_venue": "kalshi",
"buy_no_price": 0.5,
"similarity": 0.72,
"min_liquidity": 18500,
"polymarket_market_id": "559651",
"kalshi_ticker": "FED-26DEC-CUT",
"polymarket_question": "Federal Reserve cuts rates in December 2026?",
"kalshi_question": "Federal Reserve cut rates December 2026 meeting?",
"polymarket_url": "https://polymarket.com/event/fed-rate-cut-december",
"kalshi_url": "https://kalshi.com/markets/FED-26DEC-CUT"
}
]
}{
"error": "VALIDATION_ERROR",
"message": "Send ticker or cik"
}{
"error": "UNAUTHORIZED",
"message": "The API key is not valid"
}{
"error": "PLAN_REQUIRED",
"message": "The account of this key has no active data API plan"
}{
"error": "NOT_FOUND",
"message": "No company has this ticker or CIK"
}{
"error": "RATE_LIMITED",
"message": "Too many requests"
}{
"error": "INTERNAL_ERROR",
"message": "Something went wrong"
}{
"error": "UNAVAILABLE",
"message": "The data service is unavailable"
}Overview
This endpoint compares active binary contracts on Polymarket and Kalshi, matches pairs by normalized question-token overlap, and returns complementary YES and NO combinations whosecombined_cost falls below 1.00. Opportunities return in arbitrage_opportunities, ranked from highest gross edge_percent downward.
| Coverage | Details |
|---|---|
| Venues compared | Live active contracts from polymarket and kalshi (30-second cache) |
| Matching threshold | min_similarity Jaccard token similarity from 0 to 1 (default 0.5) |
| Edge floor | min_edge_pct minimum gross edge percentage from 0 to 99 (default 0.5) |
| Liquidity floor | min_liquidity minimum USD liquidity required on the smaller leg (default 0) |
| Row limit | limit from 1 to 100 opportunities (default 50), sorted descending by edge_percent |
| MCP tool | scan_prediction_market_arbitrage on the data API MCP server |
Matching math and verification caveats
Understanding how the scanner pairs contracts helps avoid false positives from similar wording with different resolution rules.- Question token matching. Each contract’s
questionis lowercased, stripped of punctuation, filtered to tokens of three or more characters excluding common stopwords, and scored with Jaccard similarity (intersection / union). Raisemin_similarity(for example0.65or0.75) to require tighter textual overlap. - Combined cost and gross edge. For every matched pair, Darvas checks both cross-venue directions (
polymarket YES + kalshi NOandkalshi YES + polymarket NO), selects the cheapercombined_cost, setsbuy_yes_venue,buy_yes_price,buy_no_venue, andbuy_no_price, and computesedge_percent = (1 - combined_cost) * 100. - Liquidity and resolution checks.
min_liquidityequals the smaller of the two venues’ reported liquidity values. Grossedge_percentdoes not deduct exchange trading fees, settlement fees, or order-book slippage. Always inspectpolymarket_question,kalshi_question,polymarket_url, andkalshi_urlto confirm both venues share the same resolution source and cutoff date. - Related endpoints. Inspect full order-book quotes, spreads, and resolution dates on
/prediction-markets. Check underlying rate or crypto prices with/macro/interest-ratesand/crypto/prices.
Examples
import os
import requests
headers = {"X-API-KEY": os.environ["DARVAS_API_KEY"]}
resp = requests.get(
"https://api.darvas.app/v1/prediction-markets/arbitrage",
headers=headers,
params={
"min_similarity": 0.6,
"min_edge_pct": 1.0,
"min_liquidity": 5000,
"limit": 20,
},
).json()
for opp in resp["arbitrage_opportunities"]:
print(f'{opp["edge_percent"]}% edge (cost {opp["combined_cost"]}, sim {opp["similarity"]})')
print(" YES:", opp["buy_yes_venue"], opp["buy_yes_price"], "| NO:", opp["buy_no_venue"], opp["buy_no_price"])
print(" Polymarket:", opp["polymarket_question"], opp["polymarket_url"])
print(" Kalshi:", opp["kalshi_question"], opp["kalshi_url"])
# Scan Polymarket and Kalshi spreads with at least 0.65 question similarity and $1,000 min leg liquidity
curl -H "X-API-KEY: $DARVAS_API_KEY" \
"https://api.darvas.app/v1/prediction-markets/arbitrage?min_similarity=0.65&min_edge_pct=0.5&min_liquidity=1000&limit=25"
Authorizations
apiKeybearerKey