---
updatedAt: 2026-10-27T18:21:50.000Z
agentTools:
  projectIndex: https://developer.opticodds.com/llms.txt
---

# /prediction-markets/events/ids

## Description

Get every native, per-platform event ID that OpticOdds tracks for a given prediction-market category. Each ID is returned in the form `platform:source_event_id` (e.g. `kalshi:EUEXIT`, `polymarket:101101`).

Use the IDs returned here as input to `/prediction-markets/events` (pass one as `event_id`) to pull full details — title, description, category, and per-market `question` / `source_market_id`.

## Specific Parameter Information

For a full list of parameters, scroll to the bottom of this page.

You must pass `category`. Authenticate with the `X-Api-Key` header.

### category

*(Required.)* One of the values returned by `/prediction-markets/categories`: `politics`, `economics`, `finance`, `crypto`, `tech`, `culture`, `climate`, `health`, `geopolitics`, `companies`, `other`.

*Note: this parameter takes a single value. It is not repeatable — if it's passed more than once, only the last value is used.*

### platform

*(Optional.)* Restrict results to one platform. Valid values: `kalshi`, `polymarket`. Omit to return IDs from both platforms.

### include\_latencies

*(Optional.)* Set to `true` to add a `latencies` object (`{"total": <seconds>}`) showing how long the request took to process.

## Example Responses

#### All Event IDs in a Category

URL: `https://api.opticodds.com/api/v3/prediction-markets/events/ids?category=politics`

```json
{
  "data": [
    "kalshi:AMAZONFTC-29DEC31",
    "kalshi:CONTROLH-2026",
    "kalshi:EUEXIT",
    "kalshi:GOVPARTYCA-26",
    "polymarket:101101",
    "polymarket:101106",
    "polymarket:960993"
  ]
}
```

#### Filtered to a Single Platform

URL: `https://api.opticodds.com/api/v3/prediction-markets/events/ids?category=crypto&platform=kalshi`

```json
{
  "data": [
    "kalshi:KXBTC-26SEP0411",
    "kalshi:KXBTC-26SEP0417",
    "kalshi:KXBTCY-27JAN0100",
    "kalshi:KXDOGE-26SEP0411",
    "kalshi:KXBTCMAXY-26DEC31"
  ]
}
```

#### With Latencies

URL: `https://api.opticodds.com/api/v3/prediction-markets/events/ids?category=crypto&include_latencies=true`

```json
{
  "latencies": {
    "total": 0.0375
  },
  "data": [
    "kalshi:KXBNB-26SEP0411",
    "kalshi:KXBTC-26SEP0411",
    "polymarket:99445"
  ]
}
```

#### Resolving an ID (via `/prediction-markets/events`)

URL: `https://api.opticodds.com/api/v3/prediction-markets/events?event_id=kalshi:EUEXIT`

```json
{
  "data": [
    {
      "platform": "kalshi",
      "source_event_id": "EUEXIT",
      "title": "EU loses a member before 2030?",
      "description": "By 2030 If any country formally leaves the EU by Jan 1, 2030, then the market resolves to Yes.",
      "category": "politics",
      "markets": [
        {
          "source_market_id": "EUEXIT-30",
          "question": "Will a country leave the EU by 2030?"
        }
      ]
    }
  ]
}
```

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "OpticOdds",
    "description": "OpticOdds API",
    "version": "3.0.0"
  },
  "servers": [
    {
      "url": "https://api.opticodds.com/api/v3",
      "description": "Production server"
    }
  ],
  "paths": {
    "/prediction-markets/events/ids": {
      "get": {
        "tags": [
          "Prediction Markets"
        ],
        "parameters": [
          {
            "description": "Prediction category. Returns every event id we hold in the category, matched or not — unlike /prediction-markets/canonical-events/ids, which returns only canonical events whose members span at least 2 platforms.",
            "required": true,
            "deprecated": false,
            "explode": true,
            "schema": {
              "title": "category",
              "type": "string"
            },
            "name": "category",
            "in": "query",
            "allowEmptyValue": false,
            "allowReserved": false
          },
          {
            "description": "Optional repeated query parameter narrowing the response to one or more platforms. Defaults to every supported platform.",
            "required": false,
            "deprecated": false,
            "explode": true,
            "schema": {
              "title": "platform",
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": []
            },
            "name": "platform",
            "in": "query",
            "allowEmptyValue": false,
            "allowReserved": false
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictionEventIdsExternalResponse"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "PredictionEventIdsExternalResponse": {
        "title": "PredictionEventIdsExternalResponse",
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "title": "Data",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "Header": {
        "type": "apiKey",
        "name": "X-Api-Key",
        "in": "header"
      },
      "QueryParam": {
        "type": "apiKey",
        "name": "key",
        "in": "query"
      }
    }
  },
  "security": [
    {
      "Header": []
    },
    {
      "QueryParam": []
    }
  ]
}
```