Skip to main content

Fetching Events

InTots exposes several endpoints for discovering and retrieving prediction-market events. All paths are relative to the base URL /api/v1/.

Event Feed (Paginated)​

The primary way to browse events is the paginated feed. It returns each event together with its main pool, the top two markets in that pool, and the aggregate volume.

GET /api/v1/events/feed

Query Parameters​

ParameterTypeDescription
cursorstringOpaque cursor returned by a previous response. Omit for the first page.
limitintegerNumber of events per page (default varies by client).
tagsstringComma-separated tag slugs to filter by (e.g. football,crypto).
statusstringFilter by event status (e.g. active, closed).

Response​

{
"events": [
{
"event": {
"id": "evt_abc123",
"name": "Will ETH reach $5,000 by June?",
"status": "active",
"tags": ["crypto"],
"created_at": "2026-03-15T10:00:00Z",
"end_date": "2026-06-30T23:59:59Z"
},
"main_pool": {
"id": "pool_xyz",
"event_id": "evt_abc123",
"name": "Main"
},
"markets": [
{
"id": "mkt_001",
"name": "Yes",
"price": 6200
},
{
"id": "mkt_002",
"name": "No",
"price": 3800
}
],
"total_volume": 48500000
}
],
"next_cursor": "eyJpZCI6MTIzfQ==",
"has_more": true
}

Key fields:

  • events[].markets -- the top 2 markets by volume inside the main pool.
  • total_volume -- cumulative trading volume across all pools, in cents.
  • markets[].price -- current market price on the 0--10000 scale (see Prices and Probability for details).
  • next_cursor / has_more -- use these for cursor-based pagination. Pass next_cursor as the cursor query parameter on the next request.

Pagination Example​

# First page
curl "https://api.intots.com/api/v1/events/feed?limit=20&status=active"

# Next page
curl "https://api.intots.com/api/v1/events/feed?limit=20&cursor=eyJpZCI6MTIzfQ=="

Single Event​

Retrieve full details for one event by its ID.

GET /api/v1/events/{id}

Path Parameters​

ParameterTypeDescription
idstringThe event ID.

Response​

Returns the complete event object including all pools, markets, metadata, and resolution criteria.

curl "https://api.intots.com/api/v1/events/evt_abc123"

All Events (Filtered)​

Fetch a full list of events with optional server-side filtering. Useful for admin dashboards or building custom views.

GET /api/v1/events

This endpoint supports the same filtering parameters as the feed but returns a flat array without cursor pagination. Prefer the feed endpoint for user-facing pages.


Search Events​

Full-text search across event names.

GET /api/v1/search_events

Query Parameters​

ParameterTypeDescription
qstringRequired. Search query (matched against event name).
limitintegerMaximum results to return (default 10).

Example​

curl "https://api.intots.com/api/v1/search_events?q=bitcoin&limit=5"

Returns an array of matching events ordered by relevance.


Active League Counts​

Get the number of currently active events grouped by sport league. Useful for building navigation menus or category badges.

GET /api/v1/leagues/active-counts

Response​

[
{ "league_id": "lg_epl", "league_name": "English Premier League", "count": 12 },
{ "league_id": "lg_nba", "league_name": "NBA", "count": 8 }
]

EventWithMainPool Structure​

Most list endpoints return events wrapped in the EventWithMainPool envelope:

FieldTypeDescription
eventobjectCore event fields (id, name, status, tags, dates, etc.).
main_poolobjectThe primary liquidity pool attached to the event.
marketsarrayUp to 2 top markets inside the main pool, each with current price.
total_volumeintegerTotal volume traded across all pools, in cents.

This structure gives you everything needed to render an event card: the event title, its current odds (via market prices), and its popularity (via volume).


Tips​

  • Use the feed for browsing. Cursor-based pagination is efficient and avoids the offset-skip performance cliff on large datasets.
  • Combine tags and status filters to build focused views (e.g. all active crypto events).
  • Prices are integers 0--10000. Divide by 100 to display as a percentage probability (e.g. 6200 = 62.00%).
  • Volumes are in cents. Divide by 100 to display in the base currency unit.