> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monetary.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Similar Events

> Groups similar Kalshi and Polymarket events by exact title and schedule proximity.

Group similar Kalshi and Polymarket events by exact title and schedule proximity.

```bash theme={null}
curl -sS "$MONETARY_API_BASE_URL/v1/prediction_markets/similar_events?hoursWindow=24&maxGroups=10" \
  -H "Authorization: Bearer $MONETARY_API_TOKEN" \
  -H "Accept: application/json"
```


## OpenAPI

````yaml GET /v1/prediction_markets/similar_events
openapi: 3.1.0
info:
  title: Monetary Public API
  description: Read-only market intelligence API for companies and prediction market data.
  version: 1.0.0
servers:
  - url: http://127.0.0.1:3003
    description: Local development
  - url: https://api.monetary.dev
    description: Production
security: []
tags:
  - name: System
    description: Service and health endpoints
  - name: Companies
    description: Company directory search and filtering
  - name: Prediction Markets
    description: Prediction market events, markets, and similarity grouping
paths:
  /v1/prediction_markets/similar_events:
    get:
      tags:
        - Prediction Markets
      summary: List similar prediction market event groups
      description: >-
        Groups similar Kalshi and Polymarket events by exact title and schedule
        proximity.
      operationId: listSimilarPredictionMarketEvents
      parameters:
        - name: provider
          in: query
          description: Optional provider filter before grouping.
          schema:
            type: string
            enum:
              - kalshi
              - polymarket
        - name: status
          in: query
          schema:
            type: string
            enum:
              - open
              - closed
        - name: externalId
          in: query
          description: Provider event external id filter.
          schema:
            type: string
        - name: category
          in: query
          description: Case-insensitive category filter.
          schema:
            type: string
        - name: hoursWindow
          in: query
          description: >-
            Window size (hours) used when matching schedule proximity.
            Non-integers are floored.
          schema:
            type: number
            minimum: 1
            maximum: 168
            default: 36
        - name: maxGroups
          in: query
          description: Maximum number of groups returned.
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
        - name: poolLimit
          in: query
          description: Candidate pool size for similarity matching.
          schema:
            type: integer
            minimum: 500
            maximum: 20000
            default: 8000
      responses:
        '200':
          description: Similar event groups
          headers:
            Cache-Control:
              description: Caching policy for successful GET responses.
              schema:
                type: string
              example: private, max-age=60, stale-while-revalidate=30
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimilarEventsResponse'
              examples:
                default:
                  value:
                    data:
                      - events:
                          - category: Crypto
                            id: evt_0cd327036fd54b93953b8f17
                            provider: kalshi
                            scheduledAt: '2026-04-30T23:00:00.000Z'
                            status: open
                            title: Will ETH exceed $5000 in April?
                          - category: Crypto
                            id: evt_3f30a9b7f4ea4bc7b70bf39c
                            provider: polymarket
                            scheduledAt: '2026-05-01T00:00:00.000Z'
                            status: open
                            title: Will ETH exceed $5000 in April?
                        hoursSpan: 1
                        maxScheduledAt: '2026-05-01T00:00:00.000Z'
                        minScheduledAt: '2026-04-30T23:00:00.000Z'
                        title: Will ETH exceed $5000 in April?
                    filters:
                      hoursWindowHours: 36
                      maxGroups: 50
                      poolLimit: 8000
                      provider: kalshi
                      status: open
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    SimilarEventsResponse:
      type: object
      required:
        - data
        - filters
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SimilarEventGroup'
        filters:
          $ref: '#/components/schemas/SimilarEventsFilters'
    SimilarEventGroup:
      type: object
      required:
        - events
        - hoursSpan
        - maxScheduledAt
        - minScheduledAt
        - title
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/PredictionMarketEvent'
        hoursSpan:
          type:
            - number
            - 'null'
        maxScheduledAt:
          type:
            - string
            - 'null'
          format: date-time
        minScheduledAt:
          type:
            - string
            - 'null'
          format: date-time
        title:
          type: string
    SimilarEventsFilters:
      type: object
      required:
        - hoursWindowHours
        - maxGroups
        - poolLimit
      properties:
        category:
          type: string
        externalId:
          type: string
        hoursWindowHours:
          type: integer
          minimum: 1
          maximum: 168
        maxGroups:
          type: integer
          minimum: 1
          maximum: 200
        poolLimit:
          type: integer
          minimum: 500
          maximum: 20000
        provider:
          $ref: '#/components/schemas/PredictionMarketProvider'
        status:
          $ref: '#/components/schemas/PredictionMarketStatus'
    ErrorResponse:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          examples:
            - BadRequest
            - Unauthorized
            - InternalServerError
        message:
          type: string
    PredictionMarketEvent:
      type: object
      required:
        - category
        - id
        - provider
        - scheduledAt
        - status
        - title
      properties:
        category:
          type:
            - string
            - 'null'
        id:
          type: string
        provider:
          $ref: '#/components/schemas/PredictionMarketProvider'
        scheduledAt:
          type:
            - string
            - 'null'
          format: date-time
        status:
          $ref: '#/components/schemas/PredictionMarketStatus'
        title:
          type: string
    PredictionMarketProvider:
      type: string
      enum:
        - kalshi
        - polymarket
    PredictionMarketStatus:
      type: string
      enum:
        - open
        - closed
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalidLimit:
              value:
                error: BadRequest
                message: limit must be an integer between 1 and 500
            invalidExpand:
              value:
                error: BadRequest
                message: expand must be 'markets'
    Unauthorized:
      description: Missing or invalid API token
      headers:
        Cache-Control:
          description: Unauthorized responses are never cached.
          schema:
            type: string
          example: no-store
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingBearerToken:
              value:
                error: Unauthorized
                message: 'Expected Authorization: Bearer <token>'
            invalidToken:
              value:
                error: Unauthorized
                message: Invalid API token
    InternalServerError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            default:
              value:
                error: InternalServerError
                message: Unexpected error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key token

````