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

# Get market trades

> Returns a paginated list of trades for a specific market. Available for Kalshi and Polymarket only (not supported by Limitless).



## OpenAPI

````yaml GET /v1/api/markets/trades
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/markets/trades:
    get:
      tags:
        - Markets
      summary: Get market trades
      description: >-
        Returns a paginated list of trades for a specific market. Available for
        Kalshi and Polymarket only (not supported by Limitless).
      operationId: getMarketTrades
      parameters:
        - name: market_id
          in: query
          required: true
          description: The market ID to fetch trades for.
          schema:
            type: string
        - name: provider
          in: query
          required: true
          description: The prediction market platform to query.
          schema:
            type: string
            enum:
              - kalshi
              - polymarket
        - name: limit
          in: query
          required: false
          description: Maximum number of trades to return.
          schema:
            type: integer
        - name: cursor
          in: query
          required: false
          description: Pagination cursor from a previous response.
          schema:
            type: string
        - name: takerOnly
          in: query
          required: false
          description: Only return taker trades.
          schema:
            type: boolean
      responses:
        '200':
          description: A paginated list of trades.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketTradesResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    MarketTradesResponse:
      type: object
      properties:
        trades:
          type: array
          items:
            $ref: '#/components/schemas/Trade'
        pagination:
          $ref: '#/components/schemas/Pagination'
        meta:
          type: object
          properties:
            request_time:
              type: integer
            market_id:
              type: string
            platform:
              type: string
            data_freshness:
              type: string
    Trade:
      type: object
      properties:
        trade_id:
          type: string
          description: Unique trade identifier.
        market_id:
          type: string
          description: Market this trade belongs to.
        platform:
          type: string
          description: Source platform.
        side:
          type: string
          description: Trade side (buy or sell).
        price:
          type: number
          description: Trade price.
        size:
          type: number
          description: Trade size (quantity).
        timestamp:
          type: integer
          format: int64
          description: Unix timestamp of the trade.
        outcome:
          type: string
          description: Outcome traded (e.g., "yes", "no").
        taker:
          type: boolean
          description: Whether this was a taker trade.
        transaction_hash:
          type: string
          description: On-chain transaction hash (Polymarket only).
        user:
          $ref: '#/components/schemas/TradeUser'
        metadata:
          type: object
          additionalProperties: true
    Pagination:
      type: object
      properties:
        total:
          type: integer
          description: Total number of results.
        limit:
          type: integer
          description: Number of results per page.
        has_more:
          type: boolean
          description: Whether more results are available.
        next_cursor:
          type: string
          nullable: true
          description: Cursor to use for the next page. `null` if no more results.
    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.
    TradeUser:
      type: object
      properties:
        name:
          type: string
        pseudonym:
          type: string
        profile_image:
          type: string
  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'
    RateLimited:
      description: Rate limit exceeded. Check the `Retry-After` header.
      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.

````