API Reference
Markets Market data endpoints for Polymarket and Kalshi
Retrieve market data from Polymarket and Kalshi. All responses use unified types with consistent JSON shapes across exchanges. Market data is cached with short TTLs (5-60 seconds).
All endpoints in this section require the read scope.
Parameter Type Description limitinteger Number of results to return searchstring Search by title pagination_keystring Cursor for pagination statusstring Filter by status: open, closed tagsstring Filter by tags
curl -s "https://papi.tylerthebuildor.com/polymarket/markets?limit=2&status=open" \
-H "Authorization: Bearer papi_sk_live_..."
The response is a raw JSON array of Market objects, not wrapped in an object.
[
{
"market_id" : "0x1234abcd..." ,
"event_id" : "evt_001" ,
"title" : "Will Bitcoin exceed $100k?" ,
"description" : "This market resolves Yes if Bitcoin..." ,
"slug" : "will-bitcoin-exceed-100k" ,
"outcomes" : [
{
"outcome_id" : "71234567890" ,
"label" : "Yes" ,
"price" : "0.72" ,
"price_change_24h" : "0.05"
},
{
"outcome_id" : "71234567891" ,
"label" : "No" ,
"price" : "0.28" ,
"price_change_24h" : "-0.05"
}
],
"resolution_date" : "2026-12-31T23:59:59Z" ,
"volume_24h" : "150000.00" ,
"volume_total" : "1250000.00" ,
"liquidity" : "50000.00" ,
"open_interest" : null ,
"url" : "https://polymarket.com/event/will-bitcoin-exceed-100k" ,
"image" : "https://..." ,
"status" : "open" ,
"category" : "Crypto" ,
"tags" : [],
"tick_size" : "0.01" ,
"exchange" : "Polymarket"
}
]
GET /polymarket/markets/{id}
Returns a single Market object by ID.
curl -s "https://papi.tylerthebuildor.com/polymarket/markets/0x1234abcd..." \
-H "Authorization: Bearer papi_sk_live_..."
Events group related markets together.
Parameter Type Description limitinteger Number of results to return searchstring Search by title pagination_keystring Cursor for pagination
curl -s "https://papi.tylerthebuildor.com/polymarket/events?limit=1" \
-H "Authorization: Bearer papi_sk_live_..."
[
{
"id" : "evt_001" ,
"title" : "Bitcoin Price Milestones" ,
"description" : "Markets tracking Bitcoin price targets" ,
"slug" : "bitcoin-price-milestones" ,
"markets" : [
{
"market_id" : "0x1234abcd..." ,
"event_id" : "evt_001" ,
"title" : "Will Bitcoin exceed $100k?" ,
"description" : "..." ,
"slug" : "will-bitcoin-exceed-100k" ,
"outcomes" : [
{ "outcome_id" : "71234567890" , "label" : "Yes" , "price" : "0.72" , "price_change_24h" : "0.05" },
{ "outcome_id" : "71234567891" , "label" : "No" , "price" : "0.28" , "price_change_24h" : "-0.05" }
],
"resolution_date" : "2026-12-31T23:59:59Z" ,
"volume_24h" : "150000.00" ,
"volume_total" : "1250000.00" ,
"liquidity" : "50000.00" ,
"open_interest" : null ,
"url" : "https://polymarket.com/event/will-bitcoin-exceed-100k" ,
"image" : "https://..." ,
"status" : "open" ,
"category" : "Crypto" ,
"tags" : [],
"tick_size" : "0.01" ,
"exchange" : "Polymarket"
}
],
"volume_24h" : "150000.00" ,
"url" : "https://polymarket.com/event/bitcoin-price-milestones" ,
"image" : "https://..." ,
"exchange" : "Polymarket"
}
]
GET /polymarket/orderbooks
Parameter Type Required Description token_idstring Yes The outcome token ID
curl -s "https://papi.tylerthebuildor.com/polymarket/orderbooks?token_id=71234567890" \
-H "Authorization: Bearer papi_sk_live_..."
{
"bids" : [
{ "price" : "0.70" , "size" : "500.00" },
{ "price" : "0.69" , "size" : "1200.00" }
],
"asks" : [
{ "price" : "0.72" , "size" : "300.00" },
{ "price" : "0.73" , "size" : "800.00" }
],
"timestamp" : "2026-03-18T12:00:00Z"
}
Parameter Type Required Description token_idstring Yes The outcome token ID limitinteger No Number of results start_timestring No ISO 8601 start time filter end_timestring No ISO 8601 end time filter
curl -s "https://papi.tylerthebuildor.com/polymarket/trades?token_id=71234567890&limit=2" \
-H "Authorization: Bearer papi_sk_live_..."
[
{
"id" : "trade_001" ,
"timestamp" : "2026-03-18T11:55:00Z" ,
"price" : "0.72" ,
"amount" : "50.00" ,
"side" : "buy"
},
{
"id" : "trade_002" ,
"timestamp" : "2026-03-18T11:50:00Z" ,
"price" : "0.71" ,
"amount" : "100.00" ,
"side" : "sell"
}
]
GET /polymarket/candlesticks
Parameter Type Required Description condition_idstring Yes The market condition ID intervalstring Yes Candle interval (e.g., 1m, 5m, 1h, 1d) start_timestring No ISO 8601 start time end_timestring No ISO 8601 end time
curl -s "https://papi.tylerthebuildor.com/polymarket/candlesticks?condition_id=0xabc...&interval=1h" \
-H "Authorization: Bearer papi_sk_live_..."
[
{
"timestamp" : "2026-03-18T12:00:00Z" ,
"open" : "0.70" ,
"high" : "0.73" ,
"low" : "0.69" ,
"close" : "0.72" ,
"volume" : "5000.00"
},
{
"timestamp" : "2026-03-18T11:00:00Z" ,
"open" : "0.68" ,
"high" : "0.71" ,
"low" : "0.67" ,
"close" : "0.70" ,
"volume" : "3200.00"
}
]
Parameter Type Required Description addressstring Yes Wallet address
curl -s "https://papi.tylerthebuildor.com/polymarket/wallet?address=0x742d35Cc..." \
-H "Authorization: Bearer papi_sk_live_..."
GET /polymarket/wallet/pnl/{address}
Parameter Type Required Description granularitystring No Time granularity: day, week, month, year, all
curl -s "https://papi.tylerthebuildor.com/polymarket/wallet/pnl/0x742d35Cc...?granularity=month" \
-H "Authorization: Bearer papi_sk_live_..."
Parameter Type Description limitinteger Number of results to return searchstring Search by title pagination_keystring Cursor for pagination statusstring Filter by status: open, closed, settled
curl -s "https://papi.tylerthebuildor.com/kalshi/markets?status=open&limit=2" \
-H "Authorization: Bearer papi_sk_live_..."
Response uses the same Market schema:
[
{
"market_id" : "KXBTC-26DEC31-T100000" ,
"event_id" : "KXBTC-26DEC31" ,
"title" : "Bitcoin above $100,000 on December 31?" ,
"description" : "..." ,
"slug" : "bitcoin-above-100000-december-31" ,
"outcomes" : [
{
"outcome_id" : "yes" ,
"label" : "Yes" ,
"price" : "0.62" ,
"price_change_24h" : "0.03"
},
{
"outcome_id" : "no" ,
"label" : "No" ,
"price" : "0.38" ,
"price_change_24h" : "-0.03"
}
],
"resolution_date" : "2026-12-31T23:59:59Z" ,
"volume_24h" : "8500.00" ,
"volume_total" : "154200.00" ,
"liquidity" : null ,
"open_interest" : "8350.00" ,
"url" : "https://kalshi.com/markets/KXBTC-26DEC31-T100000" ,
"image" : null ,
"status" : "open" ,
"category" : "Crypto" ,
"tags" : [],
"tick_size" : "0.01" ,
"exchange" : "Kalshi"
}
]
Kalshi prices are automatically converted from cents to decimals. A Kalshi price of 62 cents becomes "0.62" in the response.
GET /kalshi/markets/{ticker}
curl -s "https://papi.tylerthebuildor.com/kalshi/markets/KXBTC-26DEC31-T100000" \
-H "Authorization: Bearer papi_sk_live_..."
Returns a single Market object.
Parameter Type Description limitinteger Number of results to return searchstring Search by title
curl -s "https://papi.tylerthebuildor.com/kalshi/events?limit=1" \
-H "Authorization: Bearer papi_sk_live_..."
Returns an array of Event objects with the same schema as Polymarket events, but with "exchange": "Kalshi".
Parameter Type Required Description tickerstring Yes The market ticker
curl -s "https://papi.tylerthebuildor.com/kalshi/orderbooks?ticker=KXBTC-26DEC31-T100000" \
-H "Authorization: Bearer papi_sk_live_..."
{
"bids" : [
{ "price" : "0.61" , "size" : "200.00" },
{ "price" : "0.60" , "size" : "500.00" }
],
"asks" : [
{ "price" : "0.63" , "size" : "150.00" },
{ "price" : "0.64" , "size" : "300.00" }
],
"timestamp" : "2026-03-18T12:00:00Z"
}
Parameter Type Required Description tickerstring Yes The market ticker limitinteger No Number of results start_timestring No ISO 8601 start time end_timestring No ISO 8601 end time
curl -s "https://papi.tylerthebuildor.com/kalshi/trades?ticker=KXBTC-26DEC31-T100000&limit=2" \
-H "Authorization: Bearer papi_sk_live_..."
[
{
"id" : "trade_k001" ,
"timestamp" : "2026-03-18T11:55:00Z" ,
"price" : "0.62" ,
"amount" : "10.00" ,
"side" : "buy"
}
]
Parameter Type Required Description tickerstring Yes The market ticker intervalstring Yes Candle interval start_timestring No ISO 8601 start time end_timestring No ISO 8601 end time
curl -s "https://papi.tylerthebuildor.com/kalshi/candlesticks?ticker=KXBTC-26DEC31-T100000&interval=1h" \
-H "Authorization: Bearer papi_sk_live_..."
[
{
"timestamp" : "2026-03-18T12:00:00Z" ,
"open" : "0.60" ,
"high" : "0.63" ,
"low" : "0.59" ,
"close" : "0.62" ,
"volume" : "1500.00"
}
]
Find markets that exist on both Polymarket and Kalshi for the same underlying event.
Parameter Type Description polymarket_market_slugstring Filter by Polymarket market slug kalshi_event_tickerstring Filter by Kalshi event ticker sportstring Filter by sport datestring Filter by date
curl -s "https://papi.tylerthebuildor.com/matching-markets?sport=nba" \
-H "Authorization: Bearer papi_sk_live_..."
All market data endpoints return these types regardless of exchange.
Field Type Description market_idstring Exchange-specific market identifier event_idstring Parent event identifier titlestring Market question descriptionstring Full description slugstring URL-friendly identifier outcomesarray List of Outcome objects resolution_datestring ISO 8601 resolution date volume_24hstring 24-hour trading volume volume_totalstring All-time trading volume liquiditystring | null Current liquidity open_intereststring | null Open interest urlstring Link to market on exchange imagestring | null Market image URL statusstring open, closed, or settledcategorystring Market category tagsarray List of tag strings tick_sizestring Minimum price increment exchangestring Polymarket or Kalshi
Field Type Description outcome_idstring Outcome token/contract ID labelstring Display label (e.g., "Yes", "No") pricestring Current price as decimal string price_change_24hstring 24-hour price change
Field Type Description bidsarray List of { price, size } objects asksarray List of { price, size } objects timestampstring ISO 8601 timestamp
Field Type Description idstring Trade identifier timestampstring ISO 8601 timestamp pricestring Execution price amountstring Trade size sidestring buy or sell
Field Type Description timestampstring ISO 8601 candle open time openstring Opening price highstring Highest price lowstring Lowest price closestring Closing price volumestring Volume in the candle period