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

# Get Activity

> Retrieve comprehensive activity history for a specific user, including orders, trades, and other actions.



## OpenAPI

````yaml /prediction-market-data-reference/openapi.json get /api/workflows/polymarket/getActivity
openapi: 3.1.0
info:
  title: Prediction Market Data API
  description: >-
    Comprehensive API endpoints for querying data from prediction markets
    supported via workflows.
  version: 1.0.0
  contact:
    name: Swaps.xyz
    url: https://swaps.xyz
servers:
  - url: https://api-v2.swaps.xyz
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /api/workflows/polymarket/getActivity:
    get:
      summary: Get Activity
      description: >-
        Retrieve comprehensive activity history for a specific user, including
        orders, trades, and other actions.
      operationId: getActivity
      parameters:
        - name: userId
          in: query
          required: true
          description: User EVM EOA address
          schema:
            $ref: '#/components/schemas/Address'
          example: '0x0797bfec6d2d4f733d461bbee8125805e9e9c892'
        - name: proxyWallet
          in: query
          description: Polymarket proxy wallet address
          schema:
            $ref: '#/components/schemas/Address'
      responses:
        '200':
          description: Array of activity items
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Activity'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Address:
      type: string
      pattern: ^0x[a-fA-F0-9]{40}$
      description: EVM address (0x prefix + 40 hex characters)
      example: '0x1234567890123456789012345678901234567890'
    Activity:
      type: object
      required:
        - proxyWallet
        - timestamp
        - conditionId
        - type
        - size
        - usdcSize
        - transactionHash
        - price
        - asset
        - side
        - outcomeIndex
        - title
        - slug
        - icon
        - eventSlug
        - outcome
        - name
        - pseudonym
        - bio
        - profileImage
        - profileImageOptimized
      properties:
        proxyWallet:
          type: string
          description: User Profile Address (0x-prefixed, 40 hex chars)
          pattern: ^0x[a-fA-F0-9]{40}$
        timestamp:
          type: integer
          format: int64
          description: Unix timestamp
        conditionId:
          type: string
          description: Condition ID (0x-prefixed 64-hex string)
          pattern: ^0x[a-fA-F0-9]{64}$
        type:
          type: string
          enum:
            - TRADE
            - SPLIT
            - MERGE
            - REDEEM
            - REWARD
            - CONVERSION
          description: Activity type
        size:
          type: number
          description: Activity size
        usdcSize:
          type: number
          description: USDC value of the activity
        transactionHash:
          type: string
          description: Transaction hash
        price:
          type: number
          description: Trade price
        asset:
          type: string
          description: Asset token ID
        side:
          type: string
          enum:
            - BUY
            - SELL
            - ''
          description: Order side (BUY or SELL for trades, empty for non-trade activities)
        outcomeIndex:
          type: integer
          description: Outcome index
        title:
          type: string
          description: Market title
        slug:
          type: string
          description: Market slug
        icon:
          type: string
          description: Market icon URL
        eventSlug:
          type: string
          description: Event slug
        outcome:
          type: string
          description: Outcome name
        name:
          type: string
          description: User name
        pseudonym:
          type: string
          description: User pseudonym
        bio:
          type: string
          description: User bio
        profileImage:
          type: string
          description: User profile image URL
        profileImageOptimized:
          type: string
          description: Optimized profile image URL
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
        code:
          type: integer
          description: Error code
        details:
          type: object
          description: Additional error details
  responses:
    BadRequest:
      description: Bad request due to missing or invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Contact Swaps.xyz to obtain an API key.

````