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

# Category Analytics

> Returns aggregated statistics broken down by market category.



## OpenAPI

````yaml GET /v1/api/analytics/categories
openapi: 3.1.0
info:
  title: Dot Prediction API
  description: >-
    A unified API for accessing prediction market data across Kalshi,
    Polymarket, and Limitless.
  version: 1.0.0
servers:
  - url: https://api.dotprediction.io
security:
  - apiKey: []
paths:
  /v1/api/analytics/categories:
    get:
      tags:
        - Analytics
      summary: Category analytics
      description: Returns aggregated statistics broken down by market category.
      operationId: getCategoryAnalytics
      parameters:
        - name: provider
          in: query
          required: false
          description: Filter by platform. Omit for cross-platform results.
          schema:
            type: string
            enum:
              - kalshi
              - polymarket
              - limitless
      responses:
        '200':
          description: Category-level analytics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryAnalyticsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: 0d5813fe-a3df-4eee-bda5-8e01bfe0683a
        '500':
          $ref: 13256dda-f2cf-48d5-853d-eda20215fa08
components:
  schemas:
    CategoryAnalyticsResponse:
      type: object
      properties:
        categories:
          type: array
          items:
            $ref: '#/components/schemas/CategoryStats'
        meta:
          type: object
          properties:
            platforms:
              type: array
              items:
                type: string
            request_time:
              type: integer
              format: int64
            total_active_markets:
              type: integer
            total_volume_24h:
              type: number
    CategoryStats:
      type: object
      properties:
        name:
          type: string
        slug:
          type: string
        active_markets:
          type: integer
        total_markets:
          type: integer
        volume_24h:
          type: number
        volume_7d:
          type: number
        volume_30d:
          type: number
        total_volume:
          type: number
        total_liquidity:
          type: number
        avg_liquidity_per_market:
          type: number
        avg_spread:
          type: number
        platforms:
          type: array
          items:
            type: string
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              type: integer
              description: HTTP status code.
            message:
              type: string
              description: Human-readable error message.
            resolution:
              type: string
              description: Suggested action to resolve the error.
            error_text:
              type: string
              description: Detailed error information.
  responses:
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Generate one via the dashboard or the
        `/v1/api/auth/api-keys` endpoint.

````