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

# Wallet P&L

> Get P&L summary and realized P&L time series for a wallet

Returns both a **summary** (realized, unrealized, fees) and a **time series** of cumulative realized P\&L.

**Summary fields** (current snapshot):

* `realized_pnl` - Total realized P\&L from sells and redemptions
* `unrealized_pnl` - Unrealized P\&L computed live from open positions
* `total_pnl` - `realized_pnl + unrealized_pnl`
* `fees_paid` / `fees_refunded` - Taker fees paid and maker rebates received

**Time series** (`pnl_over_time`):

* Shows **realized P\&L only** - does not include unrealized gains/losses
* Each data point is cumulative realized P\&L at that timestamp

<Note>
  Use `condition_id` query param to filter to a specific market. This correctly handles split/merge operations by aggregating both sides.
</Note>

<Warning>
  **Rolling total PnL accuracy timeline** - Total PnL (realized + unrealized - net fees) uses rolling windows that need time to accumulate full data:

  * **All-time total PnL**: accurate immediately (February 10, 2026)
  * **1-day rolling total PnL**: fully accurate starting February 11, 2026
  * **7-day rolling total PnL**: fully accurate starting February 17, 2026
  * **30-day rolling total PnL**: fully accurate starting March 12, 2026
</Warning>


## OpenAPI

````yaml GET /v2/polymarket/wallet/pnl/{wallet}
openapi: 3.1.0
info:
  title: Predexon API
  description: Prediction market data aggregation and matching API
  version: 2.0.0
servers:
  - url: https://api.predexon.com
security:
  - apiKey: []
paths:
  /v2/polymarket/wallet/pnl/{wallet}:
    get:
      tags:
        - polymarket
      summary: Get Wallet Pnl
      description: >-
        Fetch realized profit and loss (PnL) for a specific wallet address.


        Returns realized gains only - from confirmed sells or redeems.


        When condition_id is provided, returns realized PnL for that specific
        market only.

        This handles split/merge operations correctly by aggregating both sides.
      operationId: get_wallet_pnl_v2_polymarket_wallet_pnl__wallet__get
      parameters:
        - name: wallet
          in: path
          required: true
          schema:
            type: string
            description: Wallet address to fetch PnL for
            title: Wallet
          description: Wallet address to fetch PnL for
        - name: granularity
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/PnLGranularity'
            description: Time granularity for PnL data
          description: Time granularity for PnL data
        - name: start_time
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Unix timestamp (seconds) for start of range
            title: Start Time
          description: Unix timestamp (seconds) for start of range
        - name: end_time
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Unix timestamp (seconds) for end of range
            title: End Time
          description: Unix timestamp (seconds) for end of range
        - name: condition_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter to a specific market by condition ID
            title: Condition Id
          description: Filter to a specific market by condition ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletPnLResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
components:
  schemas:
    PnLGranularity:
      type: string
      enum:
        - day
        - week
        - month
        - year
        - all
      title: PnLGranularity
      description: PnL granularity enum.
    WalletPnLResponse:
      properties:
        granularity:
          $ref: '#/components/schemas/PnLGranularity'
        start_time:
          type: integer
          title: Start Time
        end_time:
          type: integer
          title: End Time
        wallet_address:
          type: string
          title: Wallet Address
        realized_pnl:
          anyOf:
            - type: number
            - type: 'null'
          title: Realized Pnl
          description: Current total realized PnL (USD)
        unrealized_pnl:
          anyOf:
            - type: number
            - type: 'null'
          title: Unrealized Pnl
          description: Current unrealized PnL (USD), computed live from positions
        fees_paid:
          anyOf:
            - type: number
            - type: 'null'
          title: Fees Paid
          description: Total taker fees paid (USD)
        fees_refunded:
          anyOf:
            - type: number
            - type: 'null'
          title: Fees Refunded
          description: 'DEPRECATED: always 0. Refunds are already netted into fees_paid.'
        total_pnl:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Pnl
          description: realized + unrealized - fees_paid (USD)
        pnl_over_time:
          items:
            $ref: '#/components/schemas/PnLDataPoint'
          type: array
          title: Pnl Over Time
      type: object
      required:
        - granularity
        - start_time
        - end_time
        - wallet_address
        - pnl_over_time
      title: WalletPnLResponse
      description: Wallet PnL endpoint response.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PnLDataPoint:
      properties:
        timestamp:
          type: integer
          title: Timestamp
        pnl_to_date:
          type: number
          title: Pnl To Date
      type: object
      required:
        - timestamp
        - pnl_to_date
      title: PnLDataPoint
      description: Individual PnL data point.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````