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

# CTF position split/merge history for the authenticated wallet

> Reverse-chronological feed of `Vault.splitPosition` / `Vault.mergePositions` events. `before` accepts an ISO-8601 cursor; `limit` capped at 200 (default 50). `amount` and `balanceAfter` are human-decimal USDC strings (e.g. `"5"`, `"9971.64177"`) — same shape as `displayAmount.value` on `/me/activity` so a frontend that consumes both surfaces sees one format. Market context is best-effort — null fields when the market is not listed yet.



## OpenAPI

````yaml /api-reference/openapi.json get /api/me/splits-merges
openapi: 3.1.0
info:
  title: PredictStreet API
  description: >-
    Client-facing HTTP API for the PredictStreet prediction-market platform.
    **Partner kinds.** Every authenticated endpoint resolves a request's
    *effective wallet* from the partner row. `single_wallet` partners bind to
    one `associatedWallet` set at creation. `multi_wallet` partners declare the
    actor on every request via an `X-User-Wallet: 0x<40-hex>` header. See the
    [Partner kinds](/auth/api-keys#partner-kinds) doc for the full contract.
  version: '2026-06-16'
  contact:
    name: PredictStreet partners
    email: partners@predictstreet.com
servers:
  - url: https://core.api.dev.predictstreet.sde.adifoundation.ai
    description: Testnet (partner integrator API — final domain TBD)
security: []
tags:
  - name: Deposits
    description: >-
      Gasless USDC deposit relay - submit a signed EIP-2612 permit and the
      platform broadcasts the on-chain deposit for you (no gas).
  - name: Events
    description: >-
      Polymarket-style event grouping with football metadata (group, stage,
      teams, tags).
  - name: Tags
    description: Curated tag taxonomy used to filter events.
  - name: Markets
    description: 'Public market data: list, detail, orderbook, trades, OHLC.'
  - name: Crypto
    description: >-
      Crypto price markets: the underlying-asset price curve and Up/Down series
      navigation. The markets themselves are ordinary binary markets — list them
      through /api/markets and /api/events.
  - name: Orders
    description: >-
      Signed-order place / cancel / read. Requires `X-Api-Key` with
      `orders:read` / `orders:write` scope; every write additionally requires an
      EIP-712 signature over the order.
  - name: Portfolio
    description: >-
      Balances, positions, trades, fees, vault info for the key's
      `associatedWallet`. Requires `X-Api-Key` with `portfolio:read` scope.
  - name: Matches
    description: >-
      A match groups several events into one fixture/card (1X2 + first-scorer +
      over-under under one matchup).
  - name: Vault
    description: >-
      Backend co-signatures for ERC-1155 split / merge, and recovery for
      off-chain locks when the corresponding chain tx never confirmed. Requires
      `X-Api-Key` with `vault:write` scope plus an EIP-712 signature over the
      operation.
  - name: Leaderboard
    description: Public ranked leaderboard across PnL / volume buckets.
  - name: Search
    description: Global search across users, events, and matches.
  - name: Withdrawal Security
    description: >-
      Self-service withdrawal 2FA (TOTP) and withdrawal-address whitelist. Same
      endpoints serve the web app (user sessions) and API-key integrators.
      Mutations need `vault:write`, reads `portfolio:read`. Both are opt-in per
      wallet and only gate withdrawals once the platform enables
      withdrawal-security enforcement.
  - name: Platform
    description: >-
      Public platform state: the contract registry, the platform fee
      configuration, the platform freeze flag and active notices. No
      authentication.
paths:
  /api/me/splits-merges:
    get:
      tags:
        - Portfolio
      summary: CTF position split/merge history for the authenticated wallet
      description: >-
        Reverse-chronological feed of `Vault.splitPosition` /
        `Vault.mergePositions` events. `before` accepts an ISO-8601 cursor;
        `limit` capped at 200 (default 50). `amount` and `balanceAfter` are
        human-decimal USDC strings (e.g. `"5"`, `"9971.64177"`) — same shape as
        `displayAmount.value` on `/me/activity` so a frontend that consumes both
        surfaces sees one format. Market context is best-effort — null fields
        when the market is not listed yet.
      operationId: PortfolioController_splitsMerges
      parameters:
        - name: limit
          required: false
          in: query
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 200
        - name: before
          required: false
          in: query
          description: Legacy ISO-8601 cursor. Prefer `cursor`.
          schema:
            type: string
        - name: cursor
          required: false
          in: query
          description: >-
            Opaque keyset cursor — pass back a prior response's `nextCursor` to
            fetch the next (older) page. Preferred over `before`.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SplitsMergesRespDto'
      security:
        - ApiKey: []
        - access: []
components:
  schemas:
    SplitsMergesRespDto:
      type: object
      properties:
        walletAddress:
          type: string
        events:
          type: array
          items:
            $ref: '#/components/schemas/PositionSplitMergeEventDto'
        nextCursor:
          type: object
          nullable: true
          description: >-
            Opaque keyset cursor for the next (older) page; null when no more
            pages.
      required:
        - walletAddress
        - events
        - nextCursor
    PositionSplitMergeEventDto:
      type: object
      properties:
        id:
          type: string
          description: >-
            chain_watcher event_key (`txHash:logIndex`) — stable, unique per
            on-chain event.
        kind:
          type: string
          enum:
            - split
            - merge
        occurredAt:
          type: string
          description: ISO-8601 block timestamp.
        conditionId:
          type: string
          description: CTF conditionId (0x bytes32).
        amount:
          type: string
          description: >-
            Collateral USDC delta in human-decimal form (e.g. `"5"`, `"5.5"`,
            trailing-zero-trimmed). Split burns USDC to mint a complete set;
            merge burns the complete set to return USDC.
          example: '5'
        balanceAfter:
          type: string
          description: >-
            Vault USDC balance immediately after the op, human-decimal form
            (e.g. `"9971.64177"`).
          example: '9971.64177'
        txHash:
          type: string
        marketSymbol:
          type: object
          nullable: true
          description: Market symbol — null when the market has not been onboarded.
        marketTitle:
          type: object
          nullable: true
        eventId:
          type: object
          nullable: true
        eventTitle:
          type: object
          nullable: true
      required:
        - id
        - kind
        - occurredAt
        - conditionId
        - amount
        - balanceAfter
        - txHash
        - marketSymbol
        - marketTitle
        - eventId
        - eventTitle
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Partner / integrator key — format `ps_live_<keyId>_<secret>`. Partner
        keys are issued by PredictStreet; a user can also create keys bound to
        their own wallet from their account settings in the web app. Never ship
        to a browser. `multi_wallet` partners must additionally send
        `X-User-Wallet: 0x<40-hex>` on every authenticated request to declare
        the acting wallet. See the [API keys guide](/auth/api-keys) for scope
        taxonomy, partner kinds, rate limits, and rotation procedure.
    access:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: >-
        Access token from a PredictStreet web-app login, sent as `Authorization:
        Bearer <token>`. It is not issued through this API — integrators and
        bots authenticate with `X-Api-Key` instead.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.