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

> Max drawdown, current drawdown, max runup, high, low and latest values.



## OpenAPI

````yaml https://api.struct.to/openapi.json get /polymarket/trader/pnl/{address}/risk
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}/risk:
    get:
      tags:
        - Trader
      summary: Get trader PnL risk
      description: Max drawdown, current drawdown, max runup, high, low and latest values.
      operationId: get_trader_pnl_risk
      parameters:
        - name: address
          in: path
          description: Trader wallet address
          required: true
          schema:
            type: string
        - name: timeframe
          in: query
          description: 'Default: lifetime'
          required: false
          schema:
            $ref: '#/components/schemas/PnlAnalyticsTimeframe'
      responses:
        '200':
          description: Trader PnL risk
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PnlRiskResponse'
        '400':
          description: Invalid params or endpoint disabled
components:
  schemas:
    PnlAnalyticsTimeframe:
      type: string
      enum:
        - 1d
        - 24h
        - 7d
        - 30d
        - lifetime
    PnlRiskResponse:
      type: object
      required:
        - timeframe
        - resolution
        - points
      properties:
        timeframe:
          type: string
          description: Timeframe.
        resolution:
          type: string
          description: Resolution.
        from:
          type:
            - integer
            - 'null'
          format: int64
          description: Window start timestamp.
          minimum: 0
        to:
          type:
            - integer
            - 'null'
          format: int64
          description: Window end timestamp.
          minimum: 0
        points:
          type: integer
          description: Points.
          minimum: 0
        total_pnl:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PnlRiskMetric'
              description: Total PnL.
        portfolio:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PnlRiskMetric'
              description: Portfolio.
    PnlRiskMetric:
      type: object
      required:
        - max_drawdown
        - current_drawdown
        - max_runup
        - high
        - low
        - latest
      properties:
        max_drawdown:
          type: number
          format: double
          description: Max drawdown.
        max_drawdown_pct:
          type:
            - number
            - 'null'
          format: double
          description: Max drawdown percent.
        max_drawdown_market:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PnlRiskMarketMetadata'
              description: Max drawdown market.
        current_drawdown:
          type: number
          format: double
          description: Current drawdown.
        current_drawdown_pct:
          type:
            - number
            - 'null'
          format: double
          description: Current drawdown percent.
        current_drawdown_market:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PnlRiskMarketMetadata'
              description: Current drawdown market.
        max_runup:
          type: number
          format: double
          description: Max runup.
        max_runup_pct:
          type:
            - number
            - 'null'
          format: double
          description: Max runup percent.
        max_runup_market:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PnlRiskMarketMetadata'
              description: Max runup market.
        high:
          type: number
          format: double
          description: High.
        low:
          type: number
          format: double
          description: Low.
        latest:
          type: number
          format: double
          description: Latest.
    PnlRiskMarketMetadata:
      type: object
      required:
        - condition_id
      properties:
        condition_id:
          type: string
          description: Condition ID.
        market_slug:
          type:
            - string
            - 'null'
          description: Market slug.
        event_slug:
          type:
            - string
            - 'null'
          description: Event slug.
        question:
          type:
            - string
            - 'null'
          description: Question.
        title:
          type:
            - string
            - 'null'
          description: Title.
        image_url:
          type:
            - string
            - 'null'
          description: Image URL.

````