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

# Get trader PnL changes

> PnL, portfolio, balance, and open-position changes per timeframe.



## OpenAPI

````yaml https://api.struct.to/openapi.json get /polymarket/trader/pnl/{address}/changes
openapi: 3.1.0
info:
  title: Polymarket API
  description: >-
    RESTful API for querying Polymarket prediction markets data including
    events, markets, traders, holders, and real-time metrics
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.struct.to/v1
security: []
paths:
  /polymarket/trader/pnl/{address}/changes:
    get:
      tags:
        - Trader
      summary: Get trader PnL changes
      description: PnL, portfolio, balance, and open-position changes per timeframe.
      operationId: get_trader_pnl_changes
      parameters:
        - name: address
          in: path
          description: Trader wallet address
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Trader PnL changes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PnlChangesResponse'
        '400':
          description: Invalid params or endpoint disabled
components:
  schemas:
    PnlChangesResponse:
      type: object
      required:
        - changes
      properties:
        latest:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PnlLatestSnapshot'
              description: Latest.
        changes:
          type: array
          items:
            $ref: '#/components/schemas/PnlChangeWindow'
          description: Changes.
    PnlLatestSnapshot:
      type: object
      required:
        - t
        - total_pnl
        - realized_pnl
        - unrealized_pnl
        - portfolio_value
        - usdc_balance
        - pusd_balance
        - num_open_positions
      properties:
        t:
          type: integer
          format: int64
          description: Unix timestamp in seconds.
          minimum: 0
        total_pnl:
          type: number
          format: double
          description: Total PnL.
        realized_pnl:
          type: number
          format: double
          description: Realized PnL.
        unrealized_pnl:
          type: number
          format: double
          description: Unrealized PnL.
        portfolio_value:
          type: number
          format: double
          description: Portfolio value.
        usdc_balance:
          type: number
          format: double
          description: USDC balance.
        pusd_balance:
          type: number
          format: double
          description: pUSD balance.
        num_open_positions:
          type: integer
          format: int32
          description: Number of open positions.
    PnlChangeWindow:
      type: object
      required:
        - timeframe
        - from
        - to
        - total_pnl_start
        - total_pnl_end
        - total_pnl_change
        - portfolio_start
        - portfolio_end
        - portfolio_change
        - realized_pnl_change
        - unrealized_pnl_change
        - usdc_balance_change
        - pusd_balance_change
        - open_positions_change
      properties:
        timeframe:
          type: string
          description: Timeframe.
        from:
          type: integer
          format: int64
          description: Window start timestamp.
          minimum: 0
        to:
          type: integer
          format: int64
          description: Window end timestamp.
          minimum: 0
        total_pnl_start:
          type: number
          format: double
          description: Total PnL start.
        total_pnl_end:
          type: number
          format: double
          description: Total PnL end.
        total_pnl_change:
          type: number
          format: double
          description: Total PnL change.
        total_pnl_change_pct:
          type:
            - number
            - 'null'
          format: double
          description: Total PnL change percent.
        portfolio_start:
          type: number
          format: double
          description: Portfolio start.
        portfolio_end:
          type: number
          format: double
          description: Portfolio end.
        portfolio_change:
          type: number
          format: double
          description: Portfolio change.
        portfolio_change_pct:
          type:
            - number
            - 'null'
          format: double
          description: Portfolio change percent.
        realized_pnl_change:
          type: number
          format: double
          description: Realized PnL change.
        unrealized_pnl_change:
          type: number
          format: double
          description: Unrealized PnL change.
        usdc_balance_change:
          type: number
          format: double
          description: Usdc balance change.
        pusd_balance_change:
          type: number
          format: double
          description: Pusd balance change.
        open_positions_change:
          type: integer
          format: int32
          description: Open positions change.

````