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

> Position splits, merges, and redemptions on Polymarket.



## AsyncAPI

````yaml websocket/asyncapi.json activity
id: activity
title: Activity
description: Position splits, merges, and redemptions on Polymarket.
servers:
  - id: production
    protocol: wss
    host: wss.predexon.com
    bindings: []
    variables: []
address: /
parameters: []
bindings: []
operations:
  - &ref_2
    id: sendSubscribeActivity
    title: Send subscribe activity
    type: receive
    messages:
      - &ref_7
        id: SubscribeActivity
        payload:
          - name: Subscribe to Activity
            description: Subscribe to position splits, merges, and redemptions.
            type: object
            properties:
              - name: action
                type: string
                description: Must be 'subscribe'
                required: true
              - name: platform
                type: string
                description: Must be 'polymarket'
                required: true
              - name: version
                type: integer
                description: Must be 1
                required: true
              - name: type
                type: string
                description: Must be 'activity'
                required: true
              - name: filters
                type: object
                required: true
                properties:
                  - name: users
                    type: array
                    description: Wallet addresses
                    required: false
                    properties:
                      - name: item
                        type: string
                        required: false
                  - name: condition_ids
                    type: array
                    description: Market condition IDs
                    required: false
                    properties:
                      - name: item
                        type: string
                        required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - action
            - platform
            - version
            - type
            - filters
          properties:
            action:
              type: string
              description: Must be 'subscribe'
              x-parser-schema-id: <anonymous-schema-78>
            platform:
              type: string
              description: Must be 'polymarket'
              x-parser-schema-id: <anonymous-schema-79>
            version:
              type: integer
              description: Must be 1
              x-parser-schema-id: <anonymous-schema-80>
            type:
              type: string
              description: Must be 'activity'
              x-parser-schema-id: <anonymous-schema-81>
            filters:
              type: object
              properties:
                users:
                  type: array
                  description: Wallet addresses
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-84>
                  x-parser-schema-id: <anonymous-schema-83>
                condition_ids:
                  type: array
                  description: Market condition IDs
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-86>
                  x-parser-schema-id: <anonymous-schema-85>
              x-parser-schema-id: <anonymous-schema-82>
          examples:
            - action: subscribe
              platform: polymarket
              version: 1
              type: activity
              filters:
                users:
                  - '0xe9cbb1c9b3f7f411dd4fdf2ea7afa780c8b4d096'
          x-parser-schema-id: <anonymous-schema-77>
        title: Subscribe to Activity
        description: Subscribe to position splits, merges, and redemptions.
        example: |-
          {
            "action": "subscribe",
            "platform": "polymarket",
            "version": 1,
            "type": "activity",
            "filters": {
              "users": [
                "0xe9cbb1c9b3f7f411dd4fdf2ea7afa780c8b4d096"
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SubscribeActivity
          - id: x-parser-message-name
            value: SubscribeActivity
    bindings: []
    extensions: &ref_0
      - id: x-mint
        value: &ref_12
          content: >-
            <Warning>WebSocket requires a **Dev** or **Pro** API key. Free tier
            keys cannot connect. [Get your key
            →](https://dashboard.predexon.com)</Warning>
      - id: x-parser-unique-object-id
        value: activity
  - &ref_3
    id: sendUnsubscribeActivity
    title: Send unsubscribe activity
    type: receive
    messages:
      - &ref_8
        id: Unsubscribe
        payload:
          - name: Unsubscribe
            description: Remove a subscription by ID.
            type: object
            properties:
              - name: action
                type: string
                description: Must be 'unsubscribe'
                required: true
              - name: subscription_id
                type: string
                description: Subscription ID from the ack response (e.g. sub_2f4b15b33798)
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - action
            - subscription_id
          properties:
            action:
              type: string
              description: Must be 'unsubscribe'
              x-parser-schema-id: <anonymous-schema-15>
            subscription_id:
              type: string
              description: Subscription ID from the ack response (e.g. sub_2f4b15b33798)
              x-parser-schema-id: <anonymous-schema-16>
          examples:
            - action: unsubscribe
              subscription_id: sub_2f4b15b33798
          x-parser-schema-id: <anonymous-schema-14>
        title: Unsubscribe
        description: Remove a subscription by ID.
        example: |-
          {
            "action": "unsubscribe",
            "subscription_id": "sub_2f4b15b33798"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: Unsubscribe
          - id: x-parser-message-name
            value: Unsubscribe
    bindings: []
    extensions: *ref_0
  - &ref_4
    id: sendUpdateActivity
    title: Send update activity
    type: receive
    messages:
      - &ref_9
        id: Update
        payload:
          - name: Update Subscription
            description: >-
              Replace filters on an existing subscription. Not supported on the
              orderbook channel.
            type: object
            properties:
              - name: action
                type: string
                description: Must be 'update'
                required: true
              - name: subscription_id
                type: string
                description: Subscription ID to update
                required: true
              - name: filters
                type: object
                description: New filters (replaces existing filters entirely)
                required: true
                properties:
                  - name: users
                    type: array
                    description: Wallet addresses
                    required: false
                    properties:
                      - name: item
                        type: string
                        required: false
                  - name: condition_ids
                    type: array
                    description: Market condition IDs
                    required: false
                    properties:
                      - name: item
                        type: string
                        required: false
                  - name: market_slugs
                    type: array
                    description: Market URL slugs
                    required: false
                    properties:
                      - name: item
                        type: string
                        required: false
                  - name: status
                    type: string
                    description: confirmed, pending, or all (orders channel only)
                    enumValues:
                      - confirmed
                      - pending
                      - all
                    required: false
                  - name: token_ids
                    type: array
                    description: CLOB token IDs (orderbook channel only)
                    required: false
                    properties:
                      - name: item
                        type: string
                        required: false
                  - name: feeds
                    type: array
                    description: Chainlink crypto feed symbols (crypto_prices channel only)
                    required: false
                    properties:
                      - name: item
                        type: string
                        required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - action
            - subscription_id
            - filters
          properties:
            action:
              type: string
              description: Must be 'update'
              x-parser-schema-id: <anonymous-schema-18>
            subscription_id:
              type: string
              description: Subscription ID to update
              x-parser-schema-id: <anonymous-schema-19>
            filters:
              type: object
              description: New filters (replaces existing filters entirely)
              properties:
                users:
                  type: array
                  description: Wallet addresses
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-22>
                  x-parser-schema-id: <anonymous-schema-21>
                condition_ids:
                  type: array
                  description: Market condition IDs
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-24>
                  x-parser-schema-id: <anonymous-schema-23>
                market_slugs:
                  type: array
                  description: Market URL slugs
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-26>
                  x-parser-schema-id: <anonymous-schema-25>
                status:
                  type: string
                  description: confirmed, pending, or all (orders channel only)
                  enum:
                    - confirmed
                    - pending
                    - all
                  x-parser-schema-id: <anonymous-schema-27>
                token_ids:
                  type: array
                  description: CLOB token IDs (orderbook channel only)
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-29>
                  x-parser-schema-id: <anonymous-schema-28>
                feeds:
                  type: array
                  description: Chainlink crypto feed symbols (crypto_prices channel only)
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-31>
                  x-parser-schema-id: <anonymous-schema-30>
              x-parser-schema-id: <anonymous-schema-20>
          examples:
            - action: update
              subscription_id: sub_2f4b15b33798
              filters:
                users:
                  - 0xnew_address...
                status: all
          x-parser-schema-id: <anonymous-schema-17>
        title: Update Subscription
        description: >-
          Replace filters on an existing subscription. Not supported on the
          orderbook channel.
        example: |-
          {
            "action": "update",
            "subscription_id": "sub_2f4b15b33798",
            "filters": {
              "users": [
                "0xnew_address..."
              ],
              "status": "all"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: Update
          - id: x-parser-message-name
            value: Update
    bindings: []
    extensions: *ref_0
  - &ref_5
    id: receiveAckActivity
    title: Receive ack activity
    type: send
    messages:
      - &ref_10
        id: Ack
        payload:
          - name: Acknowledgement
            description: >-
              Server acknowledgement for subscribe, unsubscribe, and update
              actions.
            type: object
            properties:
              - name: type
                type: string
                description: ack
                required: true
              - name: subscription_id
                type: string
                description: The subscription ID
                required: true
              - name: channel
                type: string
                description: >-
                  Channel name (trades, activity, lifecycle, orderbook, oracle,
                  collateral, crypto_prices)
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              description: ack
              x-parser-schema-id: <anonymous-schema-33>
            subscription_id:
              type: string
              description: The subscription ID
              x-parser-schema-id: <anonymous-schema-34>
            channel:
              type: string
              description: >-
                Channel name (trades, activity, lifecycle, orderbook, oracle,
                collateral, crypto_prices)
              x-parser-schema-id: <anonymous-schema-35>
          required:
            - type
            - subscription_id
            - channel
          examples:
            - type: ack
              subscription_id: sub_2f4b15b33798
              channel: trades
          x-parser-schema-id: <anonymous-schema-32>
        title: Acknowledgement
        description: Server acknowledgement for subscribe, unsubscribe, and update actions.
        example: |-
          {
            "type": "ack",
            "subscription_id": "sub_2f4b15b33798",
            "channel": "trades"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: Ack
          - id: x-parser-message-name
            value: Ack
    bindings: []
    extensions: *ref_0
  - &ref_6
    id: receiveActivityEvent
    title: Receive activity event
    type: send
    messages:
      - &ref_11
        id: ActivityEvent
        payload:
          - name: Activity Event
            description: Split, merge, or redeem event.
            type: object
            properties:
              - name: event_type
                type: string
                description: split, merge, redeem, or conversion (V2 NegRisk)
                enumValues:
                  - split
                  - merge
                  - redeem
                  - conversion
                required: true
              - name: user
                type: string
                description: User address
                required: true
              - name: condition_id
                type: &ref_1
                  - string
                  - 'null'
                description: >-
                  Market condition ID. null only for conversion events (spans
                  multiple conditions).
                required: true
              - name: neg_risk_event_id
                type: string
                description: NegRiskAdapter marketId (conversion only)
                required: false
              - name: index_set
                type: string
                description: >-
                  uint256 bitmap as decimal string — which question indices were
                  converted (conversion only)
                required: false
              - name: collateral_token
                type: string
                description: Collateral token address (USDC)
                required: false
              - name: amount
                type: integer
                description: Raw collateral amount (6 decimals)
                required: true
              - name: amount_normalized
                type: number
                description: Human-readable amount
                required: true
              - name: payout
                type: integer
                description: Payout amount (redeem only)
                required: false
              - name: payout_normalized
                type: number
                description: Human-readable payout (redeem only)
                required: false
              - name: tx_hash
                type: string
                description: Transaction hash
                required: true
              - name: log_index
                type: string
                description: Log index (hex)
                required: false
              - name: block_number
                type: string
                description: Block number (hex)
                required: false
              - name: timestamp
                type: integer
                description: Unix timestamp in seconds
                required: true
              - name: title
                type: string
                description: Market title
                required: false
              - name: market_slug
                type: string
                description: Market URL slug
                required: false
              - name: market_id
                type: string
                description: Internal market ID
                required: false
              - name: image
                type: string
                description: Market image URL
                required: false
              - name: tokens
                type: array
                description: Outcome tokens [{token_id, label}]
                required: false
                properties:
                  - name: token_id
                    type: string
                    required: false
                  - name: label
                    type: string
                    required: false
              - name: version
                type: integer
                description: 1 for V1, 2 for V2 (currently always 1)
                enumValues:
                  - 1
                  - 2
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            event_type:
              type: string
              description: split, merge, redeem, or conversion (V2 NegRisk)
              enum:
                - split
                - merge
                - redeem
                - conversion
              x-parser-schema-id: <anonymous-schema-88>
            user:
              type: string
              description: User address
              x-parser-schema-id: <anonymous-schema-89>
            condition_id:
              type: *ref_1
              description: >-
                Market condition ID. null only for conversion events (spans
                multiple conditions).
              x-parser-schema-id: <anonymous-schema-90>
            neg_risk_event_id:
              type: string
              description: NegRiskAdapter marketId (conversion only)
              x-parser-schema-id: <anonymous-schema-91>
            index_set:
              type: string
              description: >-
                uint256 bitmap as decimal string — which question indices were
                converted (conversion only)
              x-parser-schema-id: <anonymous-schema-92>
            collateral_token:
              type: string
              description: Collateral token address (USDC)
              x-parser-schema-id: <anonymous-schema-93>
            amount:
              type: integer
              description: Raw collateral amount (6 decimals)
              x-parser-schema-id: <anonymous-schema-94>
            amount_normalized:
              type: number
              description: Human-readable amount
              x-parser-schema-id: <anonymous-schema-95>
            payout:
              type: integer
              description: Payout amount (redeem only)
              x-parser-schema-id: <anonymous-schema-96>
            payout_normalized:
              type: number
              description: Human-readable payout (redeem only)
              x-parser-schema-id: <anonymous-schema-97>
            tx_hash:
              type: string
              description: Transaction hash
              x-parser-schema-id: <anonymous-schema-98>
            log_index:
              type: string
              description: Log index (hex)
              x-parser-schema-id: <anonymous-schema-99>
            block_number:
              type: string
              description: Block number (hex)
              x-parser-schema-id: <anonymous-schema-100>
            timestamp:
              type: integer
              description: Unix timestamp in seconds
              x-parser-schema-id: <anonymous-schema-101>
            title:
              type: string
              description: Market title
              x-parser-schema-id: <anonymous-schema-102>
            market_slug:
              type: string
              description: Market URL slug
              x-parser-schema-id: <anonymous-schema-103>
            market_id:
              type: string
              description: Internal market ID
              x-parser-schema-id: <anonymous-schema-104>
            image:
              type: string
              description: Market image URL
              x-parser-schema-id: <anonymous-schema-105>
            tokens:
              type: array
              description: Outcome tokens [{token_id, label}]
              items:
                type: object
                properties:
                  token_id:
                    type: string
                    x-parser-schema-id: <anonymous-schema-108>
                  label:
                    type: string
                    x-parser-schema-id: <anonymous-schema-109>
                x-parser-schema-id: <anonymous-schema-107>
              x-parser-schema-id: <anonymous-schema-106>
            version:
              type: integer
              description: 1 for V1, 2 for V2 (currently always 1)
              enum:
                - 1
                - 2
              x-parser-schema-id: <anonymous-schema-110>
          required:
            - event_type
            - user
            - condition_id
            - amount
            - amount_normalized
            - tx_hash
            - timestamp
          examples:
            - event_type: split
              user: 0x6d38b759c90c...
              condition_id: 0x7fc83e5029c8...
              collateral_token: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'
              amount: 100000000
              amount_normalized: 100
              tx_hash: 0x070839...
              log_index: '0x355'
              block_number: '0x4ebcd4d'
              timestamp: 1770244769
              title: Bitcoin Up or Down - February 4
              market_slug: btc-updown-15m-1770245100
              tokens:
                - token_id: 3461486922...
                  label: Up
                - token_id: 9291673453...
                  label: Down
              version: 1
            - event_type: conversion
              user: '0xbc5403011df159368c4bc716e07bcf858dfe2eec'
              condition_id: null
              amount: 13074500
              amount_normalized: 13.0745
              tx_hash: 0xabc...
              log_index: '0x548'
              block_number: '0x51e0002'
              timestamp: 1776824366
              version: 2
              neg_risk_event_id: 0x6375f96fe3910d68...
              index_set: '320'
          x-parser-schema-id: <anonymous-schema-87>
        title: Activity Event
        description: Split, merge, or redeem event.
        example: |-
          {
            "event_type": "split",
            "user": "0x6d38b759c90c...",
            "condition_id": "0x7fc83e5029c8...",
            "collateral_token": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
            "amount": 100000000,
            "amount_normalized": 100,
            "tx_hash": "0x070839...",
            "log_index": "0x355",
            "block_number": "0x4ebcd4d",
            "timestamp": 1770244769,
            "title": "Bitcoin Up or Down - February 4",
            "market_slug": "btc-updown-15m-1770245100",
            "tokens": [
              {
                "token_id": "3461486922...",
                "label": "Up"
              },
              {
                "token_id": "9291673453...",
                "label": "Down"
              }
            ],
            "version": 1
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: ActivityEvent
          - id: x-parser-message-name
            value: ActivityEvent
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_2
  - *ref_3
  - *ref_4
receiveOperations:
  - *ref_5
  - *ref_6
sendMessages:
  - *ref_7
  - *ref_8
  - *ref_9
receiveMessages:
  - *ref_10
  - *ref_11
extensions:
  - id: x-mint
    value: *ref_12
  - id: x-parser-unique-object-id
    value: activity
securitySchemes:
  - id: apiKey
    name: api_key
    type: httpApiKey
    description: Your Predexon API key
    in: query
    extensions: []

````