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

# Get Prediction Activity

> Get a wallet's prediction market trading activity (buys, sells, redemptions).

<Warning>**Alpha** — This endpoint is part of the Prediction Markets API, currently in early access. May change without notice.</Warning>

### Query Parameters

<ParamField query="wallet" type="string" required>
  The wallet address to get activity for.
</ParamField>

<ParamField query="platforms" type="string">
  Comma-separated list of platforms to filter by.
</ParamField>

<ParamField query="types" type="string">
  Comma-separated list of activity types (e.g., `buy,sell`).
</ParamField>

<ParamField query="from" type="string | number">
  Start time. Accepts Unix timestamp in **milliseconds** (e.g., `1709913600000`) or ISO 8601 string (e.g., `2024-03-01T00:00:00Z`).
</ParamField>

<ParamField query="to" type="string | number">
  End time. Accepts Unix timestamp in **milliseconds** (e.g., `1709913600000`) or ISO 8601 string (e.g., `2024-03-01T00:00:00Z`).
</ParamField>

<ParamField query="limit" type="number" default="50">
  Number of activities to return (1 to 100).
</ParamField>

<ParamField query="page" type="number" default="1">
  Page number (1-indexed).
</ParamField>

<ParamField query="offset" type="number" default="0">
  Pagination offset (alternative to page).
</ParamField>

<ParamField query="order" type="string" default="desc">
  Sort order: `asc` or `desc`.
</ParamField>

<ParamField query="cursorHash" type="string">
  Transaction hash to anchor cursor pagination from.
</ParamField>

<ParamField query="cursorDirection" type="string" default="before">
  Cursor direction: `before` or `after`.
</ParamField>

### Response

<ResponseField name="data" type="array">
  Array of wallet activity records.

  <Expandable title="Activity Record">
    <ResponseField name="activityId" type="string">Activity ID.</ResponseField>
    <ResponseField name="type" type="string">Activity type (buy, sell, etc.).</ResponseField>
    <ResponseField name="platform" type="string">Platform name.</ResponseField>
    <ResponseField name="marketId" type="string">Market identifier.</ResponseField>
    <ResponseField name="outcomeId" type="string">Outcome token ID.</ResponseField>
    <ResponseField name="question" type="string">Market question.</ResponseField>
    <ResponseField name="label" type="string">Outcome label.</ResponseField>
    <ResponseField name="sizeToken" type="number">Number of tokens traded.</ResponseField>
    <ResponseField name="priceUSD" type="number">Execution price.</ResponseField>
    <ResponseField name="amountUSD" type="number">Trade value in USD.</ResponseField>
    <ResponseField name="txHash" type="string">Transaction hash.</ResponseField>
    <ResponseField name="txDateMs" type="number">Activity timestamp in milliseconds.</ResponseField>
    <ResponseField name="txDateIso" type="string">Activity timestamp in ISO 8601 format.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination metadata.

  <Expandable title="Pagination">
    <ResponseField name="page" type="number">Current page number.</ResponseField>
    <ResponseField name="offset" type="number">Current offset.</ResponseField>
    <ResponseField name="limit" type="number">Results per page.</ResponseField>
    <ResponseField name="pageEntries" type="number">Number of entries in this page.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="hostname" type="string">Server node identifier.</ResponseField>
<ResponseField name="took" type="number">Request processing time in milliseconds.</ResponseField>

### Usage Example

```bash theme={null}
curl -X GET "https://api.mobula.io/api/2/wallet/pm/activity?wallet=0xYourWalletAddress&types=buy,sell&limit=20"
```

### Example Response

```json theme={null}
{
  "data": [
    {
      "activityId": "act-001",
      "type": "buy",
      "platform": "polymarket",
      "marketId": "0x1234...",
      "outcomeId": "71321...",
      "question": "Will ETH reach $10,000 by end of 2026?",
      "label": "Yes",
      "sizeToken": 100,
      "priceUSD": 0.35,
      "amountUSD": 35,
      "txHash": "0xdef456...",
      "txDateMs": 1709913600000,
      "txDateIso": "2024-03-08T16:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "offset": 0,
    "limit": 20,
    "pageEntries": 1
  },
  "hostname": "node-xyz",
  "took": 42
}
```


## OpenAPI

````yaml GET /2/wallet/pm/activity
openapi: 3.0.0
info:
  version: 1.0.0
  title: Mobula Prediction Markets API
  description: >-
    Documentation of the Mobula Prediction Markets API.


    The PM API is currently served from a dedicated host:
    `pm-api-prod-eu.mobula.io`.

    All endpoints below require an API key (same key as the main Mobula API).


    Parameter names below are the **canonical names enforced by the API

    controllers** (Zod-validated). Following the wrong name (e.g. `?market=...`

    instead of `?platform=...&marketId=...`) returns `HTTP 400`.
servers:
  - url: https://pm-api-prod-eu.mobula.io/api/
    description: PM Production API (requires API key)
security: []
tags:
  - name: V2 - PM Market
    description: Prediction market data — details, prices, order book, trades, OHLCV
  - name: V2 - PM Discovery
    description: Search, trending, categories, live markets
  - name: V2 - PM Wallet
    description: Wallet prediction-market positions, balances, PnL, activity, status
paths:
  /2/wallet/pm/activity:
    get:
      tags:
        - V2 - PM Wallet
      summary: Get Prediction Activity
      description: >
        Get a wallet's prediction market trading activity (buys, sells,
        redemptions).


        ⚠️ `from` and `to` are accepted as ISO date strings or Unix timestamps
        (DateQuery

        format — the API coerces to a Date object).
      parameters:
        - $ref: '#/components/parameters/Wallet'
        - name: platforms
          in: query
          required: false
          description: Comma-separated platform filter (e.g. `polymarket`).
          schema:
            type: string
        - name: types
          in: query
          required: false
          description: Comma-separated activity type filter (e.g. `buy,sell`).
          schema:
            type: string
        - name: from
          in: query
          required: false
          description: Start of the time window (ISO date or Unix timestamp).
          schema:
            type: string
        - name: to
          in: query
          required: false
          description: End of the time window (ISO date or Unix timestamp).
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Page size (1-100).
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: page
          in: query
          required: false
          description: 1-based page index (alternative to `offset`).
          schema:
            type: integer
            minimum: 1
            default: 1
        - $ref: '#/components/parameters/Offset'
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: cursorHash
          in: query
          required: false
          description: Opaque cursor hash for keyset pagination.
          schema:
            type: string
        - name: cursorDirection
          in: query
          required: false
          schema:
            type: string
            enum:
              - before
              - after
            default: before
      responses:
        '200':
          description: Activity list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
components:
  parameters:
    Wallet:
      name: wallet
      in: query
      required: true
      description: >-
        User EOA wallet address. The API resolves the matching Safe trading
        account internally.
      schema:
        type: string
        example: '0x0000000000000000000000000000000000000001'
    Offset:
      name: offset
      in: query
      required: false
      description: Pagination offset.
      schema:
        type: integer
        minimum: 0
        default: 0

````