Get up and running with the Predexon API in just a few minutes.
Prerequisites
Store your API key securely as an environment variable. Never commit it to version control.
Make Your First Request
Let's fetch a list of active Polymarket markets with time-based metrics:
curl -X GET "https://api.predexon.com/v1/polymarket/markets/active?limit=2&sort=volume" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response:
{
"markets" : [
{
"market_slug" : "will-trump-win-2024" ,
"condition_id" : "0x1234...abcd" ,
"title" : "Will Trump win the 2024 election?" ,
"side_a_price" : 0.52 ,
"side_b_price" : 0.48 ,
"volume_24_hours" : 1250000.50 ,
"volume_1_week" : 8500000.00 ,
"volume_1_month" : 25000000.00 ,
"volume_total" : 150000000.00 ,
"liquidity_total" : 5000000.00 ,
"side_a" : { "id" : "12345..." , "label" : "Yes" },
"side_b" : { "id" : "67890..." , "label" : "No" },
"status" : "open"
}
],
"pagination" : {
"limit" : 2 ,
"offset" : 0 ,
"total" : 1250 ,
"has_more" : true
}
}
Query Parameters
Parameter Type Default Description limitinteger 20 Number of markets (1-100) offsetinteger 0 Number of markets to skip sortstring volumeSort by: volume, liquidity, price_desc, price_asc min_pricefloat - Minimum price (0.0-1.0) max_pricefloat - Maximum price (0.0-1.0) min_liquidityfloat - Minimum liquidity in USD min_volumefloat - Minimum volume in USD tagsstring[] - Filter by tag(s) searchstring - Search in title
List All Markets (Open & Closed)
For a lightweight listing without time-based deltas, use /markets:
curl -X GET "https://api.predexon.com/v1/polymarket/markets?limit=10&status=open" \
-H "Authorization: Bearer YOUR_API_KEY"
The /markets endpoint returns only volume_total and liquidity_total. Use /markets/active for 24h/1w/1m metrics.
Common Use Cases
Find Matching Markets Across Platforms
Discover arbitrage opportunities by finding equivalent markets on Kalshi:
curl -X GET "https://api.predexon.com/v1/matching-markets?polymarket_market_slug=will-trump-win-2024" \
-H "Authorization: Bearer YOUR_API_KEY"
You must provide exactly one of polymarket_market_slug or kalshi_market_ticker. These parameters cannot be combined in a single request.
Finding Market Identifiers
Polymarket Market Slug:
Refer to the Polymarket Gamma Markets API documentation for retrieving market slugs.
Note: A market slug is different from an event slug . An event can contain multiple markets, so ensure you're using the correct market-level identifier.
Kalshi Market Ticker:
Navigate to any market on Kalshi .
Click the Timeline and Payout button on the market page to find the market ticker.
Match Types:
Exact matches: Same underlying event with equivalent resolution criteria. Ideal for arbitrage. Similarity score >= 0.95.
Related matches: Similar or correlated events (same entity different outcome, or same event different candidate). Useful for hedging and research. Similarity score between 0.90 and 0.95.
The similarity field may be null for matches created before January 4th, 2025.
Example Response:
{
"query" : {
"platform" : "POLYMARKET" ,
"market_slug" : "will-trump-win-2024" ,
"title" : "Will Trump win the 2024 election?" ,
"status" : "active"
},
"matches" : {
"KALSHI" : {
"exact" : [
{
"market_ticker" : "PRES-2024-DJT" ,
"title" : "Trump wins 2024 presidential election?" ,
"status" : "active" ,
"explanation" : "Both markets predict the same outcome" ,
"similarity" : 0.98
}
],
"related" : []
}
},
"summary" : {
"total_matches" : 1 ,
"exact_matches" : 1 ,
"related_matches" : 0 ,
"platforms" : [ "KALSHI" ]
}
}
Get Active Exact Matched Pairs
Discover all arbitrage opportunities by fetching all active exact-matched market pairs:
curl -X GET "https://api.predexon.com/v1/matching-markets/pairs?min_similarity=95&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"
Parameter Type Default Description min_similarityinteger null Minimum similarity score (0-100) limitinteger 50 Maximum pairs to return (1-50) pagination_keystring null Cursor for pagination
Key Differences from Get Matching Markets:
No input required - returns all pairs instead of matches for a specific market
Only returns exact matches (similarity >= 95)
Only active pairs where both markets are open
Example Response:
{
"pairs" : [
{
"POLYMARKET" : {
"market_slug" : "will-lebron-james-win-the-2028-democratic-presidential-nomination" ,
"title" : "Will LeBron James win the 2028 Democratic presidential nomination?"
},
"KALSHI" : {
"market_ticker" : "KXPRESNOMD-28-LJAM" ,
"title" : "Will Lebron James be the Democratic Presidential nominee in 2028?" ,
"yes_subtitle" : "Lebron James"
},
"similarity" : 97 ,
"explanation" : "Same entity (LeBron James), same outcome (wins and accepts the 2028 Democratic presidential nomination), same timeframe (2028) — resolves identically."
}
],
"pagination" : {
"limit" : 10 ,
"count" : 1 ,
"pagination_key" : "eyJzaW1pbGFyaXR5Ijo5NywicG1fc2x1ZyI6IndpbGwtbGVicm9uLWphbWVzLXdpbi4uLiJ9" ,
"has_more" : false
}
}
The similarity score uses a 0-100 scale (not 0-1). A similarity of 97 means 97% match confidence.
Get Historical Price Data
Fetch candlestick data for charting:
curl -X GET "https://api.predexon.com/v1/polymarket/candlesticks/{condition_id}?interval=60" \
-H "Authorization: Bearer YOUR_API_KEY"
Parameter Type Default Description intervalinteger 1 1 (1m), 60 (1h), or 1440 (1d)start_timeinteger - Unix timestamp (seconds) end_timeinteger - Unix timestamp (seconds)
Time range limits apply based on interval: 1m = 1 week max, 1h = 1 month max, 1d = 1 year max.
Track Wallet Performance
Get realized PnL for any wallet address:
curl -X GET "https://api.predexon.com/v1/polymarket/wallet/pnl/{wallet_address}?granularity=day" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response:
{
"wallet_address" : "0xabc...123" ,
"granularity" : "day" ,
"start_time" : 1701388800 ,
"end_time" : 1701475200 ,
"pnl_over_time" : [
{ "timestamp" : 1701388800 , "pnl_to_date" : 1250.50 },
{ "timestamp" : 1701475200 , "pnl_to_date" : 1320.75 }
]
}
This returns realized PnL only from confirmed sells or redeems. It differs from Polymarket's dashboard which shows unrealized PnL.
Get Current Positions
Get all positions for a wallet with cost basis, current values, and P&L:
curl -X GET "https://api.predexon.com/v1/polymarket/wallet/positions/{wallet_address}?sort_by=value&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response:
{
"wallet_address" : "0xabc...123" ,
"positions" : [
{
"market" : {
"condition_id" : "0x1234...abcd" ,
"market_slug" : "will-trump-win-2024" ,
"title" : "Will Trump win the 2024 election?" ,
"side" : "YES" ,
"token_id" : "12345..." ,
"status" : "open"
},
"position" : {
"shares" : 1000.0 ,
"avg_entry_price" : 0.52 ,
"total_cost_usd" : 520.0
},
"current" : {
"price" : 0.58 ,
"value_usd" : 580.0
},
"pnl" : {
"unrealized_usd" : 60.0 ,
"unrealized_pct" : 11.54 ,
"realized_usd" : 0.0
}
}
],
"summary" : {
"total_positions" : 1 ,
"total_value_usd" : 580.0 ,
"total_cost_usd" : 520.0 ,
"total_unrealized_pnl_usd" : 60.0 ,
"total_realized_pnl_usd" : 0.0
},
"pagination" : {
"limit" : 10 ,
"offset" : 0 ,
"total" : 1 ,
"has_more" : false
}
}
Parameter Type Default Description include_closedboolean false Include zero-balance (closed) positions min_sharesfloat 1.0 Minimum number of shares to include sort_bystring valuevalue, unrealized_pnl, realized_pnl, costorderstring descasc or desclimitinteger 100 Number of positions (1-500)
Filter Behavior
The include_closed and min_shares parameters interact as follows:
include_closed min_shares Result false (default) 1 (default) Only open positions with ≥1 share false 100 Only open positions with ≥100 shares true 1 All positions (including 0-share closed) with active ones ≥1 share true 100 Closed positions + open positions with ≥100 shares
When include_closed=true, closed positions (0 shares) are always included regardless of min_shares. The min_shares filter only applies to open positions.
Code Examples
Python
import requests
import os
API_KEY = os.environ.get( "PREDEXON_API_KEY" )
BASE_URL = "https://api.predexon.com"
headers = { "Authorization" : f "Bearer {API_KEY} " }
# Get active markets with time-based metrics
response = requests.get(
f " {BASE_URL} /v1/polymarket/markets/active" ,
headers = headers,
params = { "limit" : 10 , "sort" : "volume" }
)
data = response.json()
for market in data[ "markets" ]:
print ( f " { market[ 'title' ] } " )
print ( f " Price: Yes= { market[ 'side_a_price' ] :.2f } , No= { market[ 'side_b_price' ] :.2f } " )
print ( f " 24h Volume: $ { market[ 'volume_24_hours' ] :,.0f } " )
print ( f " Total Volume: $ { market[ 'volume_total' ] :,.0f } " )
print ( f " \n Showing {len (data[ 'markets' ]) } of { data[ 'pagination' ][ 'total' ] } markets" )
JavaScript / TypeScript
const API_KEY = process.env. PREDEXON_API_KEY ;
const BASE_URL = "https://api.predexon.com" ;
async function getActiveMarkets () {
const response = await fetch (
`${ BASE_URL }/v1/polymarket/markets/active?limit=10&sort=volume` ,
{
headers: {
Authorization: `Bearer ${ API_KEY }` ,
},
}
);
if ( ! response.ok) {
throw new Error ( `API error: ${ response . status }` );
}
const data = await response. json ();
data.markets. forEach (( market ) => {
console. log ( `${ market . title }` );
console. log ( ` Price: Yes=${ market . side_a_price }, No=${ market . side_b_price }` );
console. log ( ` 24h Volume: $${ market . volume_24_hours . toLocaleString () }` );
});
console. log ( ` \n Showing ${ data . markets . length } of ${ data . pagination . total } markets` );
}
getActiveMarkets ();
Next Steps
Last modified on January 8, 2026