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

# Activity

> Fetch trading activity (merges, splits, redeems) for a user

Query non-trade wallet activity. Includes `SPLIT` (deposit collateral to create YES+NO pairs), `MERGE` (combine pairs back to collateral), `REDEEM` (redeem winning tokens after resolution), and `CONVERT` (NegRisk position conversions - sell NO tokens on a subset of conditions, buy YES tokens on the remainder).

<Tip>**Free & Unlimited.** This endpoint does not count toward your monthly usage limits on any plan.</Tip>

<Warning>
  **`CONVERT` rows behave differently.** Conversions are a market-level operation, not a per-outcome one. On `CONVERT` rows:

  * `condition_id` is an **empty string** and `market_id` is `null` - filtering by either will not match.
  * The parent identifier lives in the new `neg_risk_market_id` field (32-byte hex, matches Gamma's `Event.negRiskMarketID`).
  * `index_set` carries the NegRisk indexSet bitmask (decimal string) of which outcomes were involved.
  * `market_slug`/`title` may be empty.

  For SPLIT/MERGE/REDEEM, `market_id` and `condition_id` are populated as before; `neg_risk_market_id` and `index_set` are `null`.
</Warning>

| Constraint | Value               |
| ---------- | ------------------- |
| `limit`    | 1–500 (default 100) |
| `offset`   | No limit            |


## OpenAPI

````yaml GET /v2/polymarket/activity
openapi: 3.1.0
info:
  title: Predexon API
  description: Prediction market data aggregation and matching API
  version: 2.0.0
servers:
  - url: https://api.predexon.com
security:
  - apiKey: []
paths:
  /v2/polymarket/activity:
    get:
      tags:
        - polymarket
      summary: Get Activity
      description: >-
        Fetch activity data for a specific user.


        Returns SPLIT, MERGE, REDEEM, and CONVERT events from the unified
        activity table.


        Note on CONVERT rows: these are NegRisk position conversions (sell NO
        tokens on a

        subset of conditions, buy YES tokens on the remainder). Their
        `condition_id` field

        actually carries the NegRisk parent market_id, not a CTF condition_id,
        so the

        Postgres market-metadata lookup will return empty market_slug/title for
        them.

        Filtering by condition_id will not match conversions — conversions are a

        market-level operation, not a per-outcome one.
      operationId: get_activity_v2_polymarket_activity_get
      parameters:
        - name: wallet
          in: query
          required: true
          schema:
            type: string
            description: Wallet address
            title: Wallet
          description: Wallet address
        - name: start_time
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Unix timestamp (seconds) for start
            title: Start Time
          description: Unix timestamp (seconds) for start
        - name: end_time
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Unix timestamp (seconds) for end
            title: End Time
          description: Unix timestamp (seconds) for end
        - name: market_slug
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by market slug
            title: Market Slug
          description: Filter by market slug
        - name: condition_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by condition ID
            title: Condition Id
          description: Filter by condition ID
        - name: sort_by
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/ActivitySortBy'
            description: 'Sort by: timestamp or type'
            default: timestamp
          description: 'Sort by: timestamp or type'
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            description: Number of activities to return (1-500)
            default: 100
            title: Limit
          description: Number of activities to return (1-500)
        - name: order
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/OrderDirection'
            description: 'Sort order: asc or desc'
            default: desc
          description: 'Sort order: asc or desc'
        - name: pagination_key
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Pagination key for cursor-based pagination
            title: Pagination Key
          description: Pagination key for cursor-based pagination
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivityResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    ActivitySortBy:
      type: string
      enum:
        - timestamp
        - type
      title: ActivitySortBy
      description: Sort options for activity.
    OrderDirection:
      type: string
      enum:
        - asc
        - desc
      title: OrderDirection
      description: Sort order direction enum.
    ActivityResponse:
      properties:
        activities:
          items:
            $ref: '#/components/schemas/Activity'
          type: array
          title: Activities
        pagination:
          $ref: '#/components/schemas/CursorPagination'
      type: object
      required:
        - activities
        - pagination
      title: ActivityResponse
      description: Activity endpoint response.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Activity:
      properties:
        side:
          $ref: '#/components/schemas/ActivitySide'
        market_slug:
          type: string
          title: Market Slug
        market_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Market Id
          description: >-
            Gamma market row id (numeric string). Populated for
            SPLIT/MERGE/REDEEM. Null for CONVERT — see `neg_risk_market_id`
            instead.
        neg_risk_market_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Neg Risk Market Id
          description: >-
            NegRisk parent market identifier (32-byte hex). Matches Gamma's
            `Event.negRiskMarketID`. Populated only for CONVERT rows.
        condition_id:
          type: string
          title: Condition Id
          description: >-
            CTF condition ID for SPLIT/MERGE/REDEEM (per-outcome). Empty string
            for CONVERT — conversions are market-level, so use
            `neg_risk_market_id`.
        index_set:
          anyOf:
            - type: string
            - type: 'null'
          title: Index Set
          description: >-
            NegRisk indexSet bitmask (decimal string) — which outcomes were
            involved. Populated only for CONVERT rows; null for other sides.
        shares:
          type: integer
          title: Shares
          description: Raw number of shares from blockchain
        shares_normalized:
          type: number
          title: Shares Normalized
          description: Shares normalized (raw / 1000000)
        amount_usd:
          type: number
          title: Amount Usd
          description: USD value of the activity
        price:
          type: number
          title: Price
        tx_hash:
          type: string
          title: Tx Hash
        title:
          type: string
          title: Title
        timestamp:
          type: integer
          title: Timestamp
          description: Unix timestamp in seconds
        user:
          type: string
          title: User
          description: User wallet address
      type: object
      required:
        - side
        - market_slug
        - condition_id
        - shares
        - shares_normalized
        - amount_usd
        - price
        - tx_hash
        - title
        - timestamp
        - user
      title: Activity
      description: Activity model.
    CursorPagination:
      properties:
        limit:
          type: integer
          title: Limit
          description: Requested limit
        count:
          type: integer
          title: Count
          description: Number of items in current response
        pagination_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Pagination Key
          description: Base64-encoded cursor for next page
        has_more:
          type: boolean
          title: Has More
          description: Whether there are more items available
      type: object
      required:
        - limit
        - count
        - has_more
      title: CursorPagination
      description: Cursor-based pagination for endpoints that don't support offset.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ActivitySide:
      type: string
      enum:
        - MERGE
        - SPLIT
        - REDEEM
        - CONVERT
      title: ActivitySide
      description: Activity side enum.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````