import pmxt
# API key optional — enables faster catalog-backed lookups
exchange = pmxt.Polymarket(
pmxt_api_key="YOUR_PMXT_API_KEY",
)
result = exchange.fetch_event(event_id="12345"){
"success": true,
"error": {
"message": "<string>",
"code": "HOSTED_TRADING_ERROR",
"retryable": true,
"exchange": "<string>",
"detail": {}
},
"data": {
"id": "<string>",
"title": "<string>",
"description": "<string>",
"slug": "<string>",
"markets": [
{
"marketId": "<string>",
"title": "<string>",
"description": "<string>",
"outcomes": [
{
"outcomeId": "<string>",
"label": "<string>",
"price": 123,
"marketId": "<string>",
"priceChange24h": 123,
"metadata": {}
}
],
"volume24h": 123,
"liquidity": 123,
"url": "<string>",
"eventId": "<string>",
"slug": "<string>",
"resolutionDate": "2023-11-07T05:31:56Z",
"volume": 123,
"openInterest": 123,
"image": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"tickSize": 123,
"status": "<string>",
"contractAddress": "<string>",
"sourceMetadata": {},
"sourceExchange": "<string>",
"yes": {
"outcomeId": "<string>",
"label": "<string>",
"price": 123,
"marketId": "<string>",
"priceChange24h": 123,
"metadata": {}
},
"no": {
"outcomeId": "<string>",
"label": "<string>",
"price": 123,
"marketId": "<string>",
"priceChange24h": 123,
"metadata": {}
},
"up": {
"outcomeId": "<string>",
"label": "<string>",
"price": 123,
"marketId": "<string>",
"priceChange24h": 123,
"metadata": {}
},
"down": {
"outcomeId": "<string>",
"label": "<string>",
"price": 123,
"marketId": "<string>",
"priceChange24h": 123,
"metadata": {}
}
}
],
"volume24h": 123,
"url": "<string>",
"volume": 123,
"image": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"sourceMetadata": {},
"sourceExchange": "<string>"
}
}Events & Markets
Fetch Event
Fetch a single event by lookup parameters. Convenience wrapper around fetchEvents() that returns a single result or throws EventNotFound.
GET
/
api
/
{exchange}
/
fetchEvent
import pmxt
# API key optional — enables faster catalog-backed lookups
exchange = pmxt.Polymarket(
pmxt_api_key="YOUR_PMXT_API_KEY",
)
result = exchange.fetch_event(event_id="12345"){
"success": true,
"error": {
"message": "<string>",
"code": "HOSTED_TRADING_ERROR",
"retryable": true,
"exchange": "<string>",
"detail": {}
},
"data": {
"id": "<string>",
"title": "<string>",
"description": "<string>",
"slug": "<string>",
"markets": [
{
"marketId": "<string>",
"title": "<string>",
"description": "<string>",
"outcomes": [
{
"outcomeId": "<string>",
"label": "<string>",
"price": 123,
"marketId": "<string>",
"priceChange24h": 123,
"metadata": {}
}
],
"volume24h": 123,
"liquidity": 123,
"url": "<string>",
"eventId": "<string>",
"slug": "<string>",
"resolutionDate": "2023-11-07T05:31:56Z",
"volume": 123,
"openInterest": 123,
"image": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"tickSize": 123,
"status": "<string>",
"contractAddress": "<string>",
"sourceMetadata": {},
"sourceExchange": "<string>",
"yes": {
"outcomeId": "<string>",
"label": "<string>",
"price": 123,
"marketId": "<string>",
"priceChange24h": 123,
"metadata": {}
},
"no": {
"outcomeId": "<string>",
"label": "<string>",
"price": 123,
"marketId": "<string>",
"priceChange24h": 123,
"metadata": {}
},
"up": {
"outcomeId": "<string>",
"label": "<string>",
"price": 123,
"marketId": "<string>",
"priceChange24h": 123,
"metadata": {}
},
"down": {
"outcomeId": "<string>",
"label": "<string>",
"price": 123,
"marketId": "<string>",
"priceChange24h": 123,
"metadata": {}
}
}
],
"volume24h": 123,
"url": "<string>",
"volume": 123,
"image": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"sourceMetadata": {},
"sourceExchange": "<string>"
}
}Faster with an API key — With a PMXT API key this endpoint is served from an indexed catalog (~10 ms) instead of proxying to the venue (~500 ms). No code changes required — same request, same response, just faster. Learn more.
Use cases
Look up by slug
Slugs are the most reliable way to look up a specific event — they are human-readable, stable, and easy to share or store in config:import pmxt
# Optional: pass pmxt_api_key for ~100x faster catalog-backed lookups
api = pmxt.Polymarket()
event = api.fetch_event(slug="presidential-election-winner-2028")
print(event.title, event.volume_24h)
import { Polymarket } from "pmxtjs";
// Optional: pass pmxtApiKey for ~100x faster catalog-backed lookups
const api = new Polymarket();
const event = await api.fetchEvent({ slug: "presidential-election-winner-2028" });
console.log(event.title, event.volume24h);
curl "https://api.pmxt.dev/api/polymarket/fetchEvent?slug=presidential-election-winner-2028" \
-H "Authorization: Bearer $PMXT_API_KEY"
Look up by event ID
When you already have an event ID from a previous API call or webhook, useeventId for a direct lookup:
import pmxt
api = pmxt.Polymarket()
event = api.fetch_event(event_id="a49db286-39ca-4119-9de5-1335a92ef92a")
print(event.title, event.url)
import { Polymarket } from "pmxtjs";
const api = new Polymarket();
const event = await api.fetchEvent({ eventId: "a49db286-39ca-4119-9de5-1335a92ef92a" });
console.log(event.title, event.url);
curl "https://api.pmxt.dev/api/polymarket/fetchEvent?eventId=a49db286-39ca-4119-9de5-1335a92ef92a" \
-H "Authorization: Bearer $PMXT_API_KEY"
Access markets within an event
Each event contains amarkets array with full market details including outcomes and prices. This is useful for building dashboards or comparing outcomes across an event’s markets:
import pmxt
api = pmxt.Limitless()
event = api.fetch_event(slug="presidential-election-winner-2028-1769010522121")
for market in event.markets:
print(f"{market.title}: {market.outcomes[1].price:.0%}")
import { Limitless } from "pmxtjs";
const api = new Limitless();
const event = await api.fetchEvent({ slug: "presidential-election-winner-2028-1769010522121" });
for (const market of event.markets) {
console.log(`${market.title}: ${(market.outcomes[1].price * 100).toFixed(0)}%`);
}
curl "https://api.pmxt.dev/api/limitless/fetchEvent?slug=presidential-election-winner-2028-1769010522121" \
-H "Authorization: Bearer $PMXT_API_KEY"
Path Parameters
Query Parameters
Filter by tags. Returns events matching ANY of the provided tags. Tags are more specific than categories -- for example a "Politics" event might carry tags ["Politics", "Geopolitics", "Middle East", "Iran"]. Common tags include "Crypto", "Elections", "Fed Rates", "FIFA World Cup", "Trump".
Response
200 - application/json
Fetch Event response
Was this page helpful?

