> ## 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.

# Trending Markets

> Returns markets ranked by volume or price change over a time window.



## OpenAPI

````yaml GET /v1/api/analytics/trending
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/trending:
    get:
      tags:
        - Analytics
      summary: Trending markets
      description: Returns markets ranked by volume or price change over a time window.
      operationId: getTrendingMarkets
      parameters:
        - name: provider
          in: query
          required: false
          description: Filter by platform. Omit for cross-platform results.
          schema:
            type: string
            enum:
              - kalshi
              - polymarket
              - limitless
        - name: window
          in: query
          required: false
          description: Time window for trend calculation.
          schema:
            type: string
            enum:
              - 24h
              - 7d
            default: 24h
        - name: sort_by
          in: query
          required: false
          description: Sort dimension.
          schema:
            type: string
            enum:
              - volume_change
              - price_change
            default: volume_change
        - name: category
          in: query
          required: false
          description: Filter by category slug.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Max results to return (default 20, max 100).
          schema:
            type: integer
            default: 20
            maximum: 100
      responses:
        '200':
          description: Trending markets ranked by the specified dimension.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrendingMarketsResponse'
        '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:
    TrendingMarketsResponse:
      type: object
      properties:
        trending:
          type: array
          items:
            $ref: '#/components/schemas/TrendingMarket'
        meta:
          type: object
          properties:
            platforms:
              type: array
              items:
                type: string
            request_time:
              type: integer
              format: int64
            window:
              type: string
            sort_by:
              type: string
            total_markets_analyzed:
              type: integer
            data_completeness:
              type: object
              additionalProperties:
                type: string
    TrendingMarket:
      type: object
      properties:
        market_id:
          type: string
        platform:
          type: string
        title:
          type: string
        category:
          type: string
        status:
          type: string
        url:
          type: string
        image_url:
          type: string
        current_price:
          $ref: '#/components/schemas/TrendingPrice'
        change:
          $ref: '#/components/schemas/TrendingChange'
        metrics:
          $ref: '#/components/schemas/TrendingMetrics'
    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.
    TrendingPrice:
      type: object
      properties:
        'yes':
          type: number
        'no':
          type: number
    TrendingChange:
      type: object
      properties:
        volume_24h:
          type: number
        volume_change_percent:
          type: number
        price_change_24h:
          type: number
        price_change_percent:
          type: number
    TrendingMetrics:
      type: object
      properties:
        total_volume:
          type: number
        liquidity:
          type: number
        open_interest:
          type: number
  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.

````