> ## 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 Closed Positions

> Get a wallet's closed prediction market positions with resolution-aware realized PnL.

<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 closed positions for.
</ParamField>

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

### Response

<ResponseField name="data" type="array">
  Array of closed positions (markets the wallet traded but no longer holds), newest first. Redeem payouts are valued from market resolution (net shares held × winning outcome price), since Polymarket's redeem events carry no USD amount.

  <Expandable title="Closed Position">
    <ResponseField name="conditionId" type="string">Market condition ID.</ResponseField>
    <ResponseField name="question" type="string">Market question.</ResponseField>
    <ResponseField name="logo" type="string">Market logo URL.</ResponseField>
    <ResponseField name="slug" type="string">Market slug.</ResponseField>
    <ResponseField name="lastDateMs" type="number">Timestamp of the most recent activity on this market, in milliseconds.</ResponseField>
    <ResponseField name="investedUSD" type="number">Total amount bought into this market in USD.</ResponseField>
    <ResponseField name="proceedsUSD" type="number">Total proceeds (sells + redeem payouts) in USD.</ResponseField>
    <ResponseField name="realizedPnlUSD" type="number">Realized profit/loss in USD (proceeds − invested).</ResponseField>
    <ResponseField name="realizedPnlPercent" type="number">Realized PnL as a percentage of invested. Null if invested is zero.</ResponseField>
    <ResponseField name="redeemed" type="boolean">Whether the position was redeemed on-chain.</ResponseField>
    <ResponseField name="won" type="boolean">Whether the redemption returned a payout.</ResponseField>

    <ResponseField name="outcomes" type="array">
      Per-outcome breakdown.

      <Expandable title="Outcome">
        <ResponseField name="label" type="string">Outcome label.</ResponseField>
        <ResponseField name="boughtShares" type="number">Total shares bought.</ResponseField>
        <ResponseField name="exitedShares" type="number">Total shares sold.</ResponseField>
        <ResponseField name="investedUSD" type="number">Amount invested in this outcome in USD.</ResponseField>
        <ResponseField name="proceedsUSD" type="number">Proceeds from this outcome in USD.</ResponseField>
      </Expandable>
    </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/closed?wallet=0xYourWalletAddress"
```

### Example Response

```json theme={null}
{
  "data": [
    {
      "conditionId": "0xadfc0dfb...",
      "question": "Bitcoin Up or Down — 12PM ET?",
      "logo": "https://...",
      "slug": "bitcoin-up-or-down",
      "lastDateMs": 1709913600000,
      "investedUSD": 4.43,
      "proceedsUSD": 5.27,
      "realizedPnlUSD": 0.84,
      "realizedPnlPercent": 18.96,
      "redeemed": true,
      "won": true,
      "outcomes": [
        {
          "label": "Up",
          "boughtShares": 5.27,
          "exitedShares": 0,
          "investedUSD": 4.43,
          "proceedsUSD": 5.27
        }
      ]
    }
  ],
  "hostname": "node-xyz",
  "took": 42
}
```


## OpenAPI

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


    **Demo API**: The default server (demo-api.mobula.io) is a demo API with
    rate limits.

    For production use, please use api.mobula.io with an API key from
    https://admin.mobula.io
servers:
  - url: https://demo-api.mobula.io/api/
    description: Demo API (rate limited, for testing only)
  - url: https://api.mobula.io/api/
    description: Production API (requires API key)
security: []
tags:
  - name: V2 - Token
    description: Token details, price, security, ATH, and holder data
  - name: V2 - Market Data
    description: Market details, OHLCV history, and lighthouse metrics
  - name: V2 - Trades
    description: Token trades, enriched trades, and trade filters
  - name: V2 - Wallet
    description: Wallet positions, activity, trades, analysis, and labels
  - name: V2 - Assets
    description: Cross-chain asset details and price history
  - name: V2 - Swap
    description: Swap quoting and execution
  - name: V2 - Perps
    description: Perpetual futures quoting, execution, and positions
  - name: V2 - Bridge
    description: Cross-chain bridge quoting and intent status (Alpha Preview)
  - name: V2 - DeFi
    description: Bonding pools and pulse data
  - name: V2 - Search
    description: Universal fast search
  - name: V2 - Blockchains
    description: System metadata and chain listings
  - name: V1 - Market Data
    description: Market prices, history, sparklines, pairs, and multi-data
  - name: V1 - Wallet
    description: Wallet portfolio, transactions, history, and NFTs
  - name: V1 - Token
    description: First buyers
  - name: V1 - Trades
    description: Market trades by pair
  - name: V1 - Metadata
    description: Token metadata, categories, trendings, and news
  - name: V1 - Assets
    description: List all assets
  - name: V1 - Search
    description: Search for assets, tokens, and pairs
  - name: V1 - DeFi
    description: Bonding pool pulse data
  - name: V1 - Blockchains
    description: Blockchain listings, pairs, and stats
  - name: V1 - Webhooks
    description: Webhook management
  - name: V1 - Feed
    description: Custom feed creation
paths:
  /2/wallet/pm/closed:
    get:
      tags:
        - BUY
        - SELL
      summary: Wallet closed prediction-market positions
      parameters:
        - schema:
            type: string
            minLength: 1
          required: true
          name: wallet
          in: query
        - schema:
            type: string
          required: false
          name: platforms
          in: query
      responses:
        '200':
          description: Prediction Markets response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        conditionId:
                          type: string
                        question:
                          type: string
                        logo:
                          type: string
                          nullable: true
                        slug:
                          type: string
                          nullable: true
                        lastDateMs:
                          type: number
                        investedUSD:
                          type: number
                        proceedsUSD:
                          type: number
                        realizedPnlUSD:
                          type: number
                        realizedPnlPercent:
                          type: number
                          nullable: true
                        redeemed:
                          type: boolean
                        won:
                          type: boolean
                        outcomes:
                          type: array
                          items:
                            type: object
                            properties:
                              label:
                                type: string
                              boughtShares:
                                type: number
                              exitedShares:
                                type: number
                              investedUSD:
                                type: number
                              proceedsUSD:
                                type: number
                            required:
                              - label
                              - boughtShares
                              - exitedShares
                              - investedUSD
                              - proceedsUSD
                      required:
                        - conditionId
                        - question
                        - lastDateMs
                        - investedUSD
                        - proceedsUSD
                        - realizedPnlUSD
                        - redeemed
                        - won
                        - outcomes
                  hostname:
                    type: string
                  took:
                    type: number
                required:
                  - data
                  - hostname
                  - took

````