{
"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>"
}
]
}Fetch Events
Fetch events with optional keyword search. Events group related markets together (e.g., “Who will be Fed Chair?” contains multiple candidate markets).
{
"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>"
}
]
}Use cases
Search by keyword
Find all events mentioning “Trump” on Polymarket:import pmxt
# Optional: pass pmxt_api_key for ~100x faster catalog-backed lookups
api = pmxt.Polymarket()
events = api.fetch_events(query="trump", limit=5)
for event in events:
print(event.title, event.url)
import { Polymarket } from "pmxtjs";
// Optional: pass pmxtApiKey for ~100x faster catalog-backed lookups
const api = new Polymarket();
const events = await api.fetchEvents({ query: "trump", limit: 5 });
events.forEach((e) => console.log(e.title, e.url));
curl "https://api.pmxt.dev/api/polymarket/fetchEvents?query=trump&limit=5" \
-H "Authorization: Bearer $PMXT_API_KEY"
Filter by category
Get all crypto-related events on Kalshi:import pmxt
api = pmxt.Limitless()
events = api.fetch_events(category="Crypto", limit=5)
import { Limitless } from "pmxtjs";
const api = new Limitless();
const events = await api.fetchEvents({ category: "Crypto", limit: 5 });
curl "https://api.pmxt.dev/api/limitless/fetchEvents?category=Crypto&limit=5" \
-H "Authorization: Bearer $PMXT_API_KEY"
Filter by tags
Get events tagged with geopolitics:import pmxt
api = pmxt.Polymarket()
events = api.fetch_events(tags=["Geopolitics", "Middle East"], limit=5)
import { Polymarket } from "pmxtjs";
const api = new Polymarket();
const events = await api.fetchEvents({
tags: ["Geopolitics", "Middle East"],
limit: 5,
});
curl "https://api.pmxt.dev/api/polymarket/fetchEvents?tags=Geopolitics&tags=Middle+East&limit=5" \
-H "Authorization: Bearer $PMXT_API_KEY"
Filter active by category
Find active sports events:import pmxt
api = pmxt.Polymarket()
events = api.fetch_events(
category="Sports",
status="active",
limit=5,
)
import { Polymarket } from "pmxtjs";
const api = new Polymarket();
const events = await api.fetchEvents({
category: "Sports",
status: "active",
limit: 5,
});
curl "https://api.pmxt.dev/api/polymarket/fetchEvents?category=Sports&status=active&limit=5" \
-H "Authorization: Bearer $PMXT_API_KEY"
Path Parameters
The prediction market exchange to target.
polymarket, kalshi, kalshi-demo, limitless, probable, baozi, myriad, opinion, metaculus, smarkets, polymarket_us, gemini-titan, hyperliquid, suibets, rain, hunch, router Query Parameters
For keyword search
Maximum number of results to return
Opaque venue pagination cursor, where supported.
Pagination offset — number of results to skip
Sort order for results
volume, liquidity, newest Filter by event status (default: 'active', 'inactive' and 'closed' are interchangeable)
active, inactive, closed, all Where to search (default: 'title')
title, description, both Direct lookup by event ID
Lookup by event slug
Filter events by their parent series. Accepts the venue-native series id / ticker / slug (e.g. Kalshi "KXATPMATCH", Polymarket "wta"). Passed through to the vendor where supported, otherwise applied to sourceMetadata after fetch.
Optional client-side filter applied after fetching
Show child attributes
Show child attributes
Filter by category. Each event belongs to a venue-assigned category such as "Sports", "Politics", "Crypto", "Bitcoin", "Soccer", "Economic Policy" (Polymarket) or "Sports", "Mentions" (Kalshi).
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".
Filter by source venue (e.g. 'polymarket', 'kalshi', 'myriad'). exchange is an alias.
Alias for sourceExchange.
Response
Fetch Events response
true
Structured error envelope returned inside BaseResponse.error and ErrorResponse.error. Hosted-mode endpoints populate code, retryable, and optionally exchange / detail; legacy local-mode endpoints may still return only message.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

