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

# Streaks, drawdown & best/worst day

> Compute-on-read streak / drawdown / best-worst-day analytics. Headline drawdown is peak-to-trough of cumulative realized PnL; a secondary close-based equity-curve drawdown is also returned. Cached 5s hot / 30s cold.



## OpenAPI

````yaml /api-reference/openapi.json get /v2/pnl/wallets/{wallet}/performance
openapi: 3.1.0
info:
  title: Dexploit API
  version: 1.0.0
  description: Real-time and historical Solana DEX swap and OHLCV data.
servers:
  - url: https://api.dexploit.dev
    description: Production
security:
  - ApiKeyHeader: []
  - BearerAuth: []
  - ApiKeyQuery: []
paths:
  /v2/pnl/wallets/{wallet}/performance:
    get:
      tags:
        - Wallet PnL (v2)
      summary: Streaks, drawdown & best/worst day
      description: >-
        Compute-on-read streak / drawdown / best-worst-day analytics. Headline
        drawdown is peak-to-trough of cumulative realized PnL; a secondary
        close-based equity-curve drawdown is also returned. Cached 5s hot / 30s
        cold.
      operationId: getPnlV2Performance
      parameters:
        - name: wallet
          in: path
          required: true
          schema:
            type: string
          description: Wallet address (base58, 32–44 characters).
        - name: from
          in: query
          required: false
          schema:
            type: string
          description: Inclusive start date (UTC, `YYYY-MM-DD`).
        - name: to
          in: query
          required: false
          schema:
            type: string
          description: Inclusive end date (UTC, `YYYY-MM-DD`).
        - name: pnl_mode
          in: query
          required: false
          schema:
            type: string
            enum:
              - raw
              - strict
              - adjusted
            default: adjusted
          description: >-
            PnL accounting mode. `strict` (FIFO) and `adjusted` (weighted-avg
            cost) are realized-PnL figures; `raw` is **net cash-flow** (Σ sells
            − Σ buys), not realized PnL. Unknown values fall back to `adjusted`.
      responses:
        '200':
          description: Performance analytics
          content:
            application/json:
              schema:
                type: object
                properties:
                  wallet:
                    type: string
                  pnl_mode:
                    type: string
                  from:
                    type:
                      - string
                      - 'null'
                  to:
                    type:
                      - string
                      - 'null'
                  best_day:
                    oneOf:
                      - type: object
                        properties:
                          day:
                            type: string
                          realized_sol:
                            type: number
                      - type: 'null'
                  worst_day:
                    oneOf:
                      - type: object
                        properties:
                          day:
                            type: string
                          realized_sol:
                            type: number
                      - type: 'null'
                  current_streak:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - win
                          - loss
                          - none
                      length:
                        type: integer
                  longest_win_streak:
                    type: integer
                  longest_loss_streak:
                    type: integer
                  max_drawdown_realized_sol:
                    type: number
                    description: 'HEADLINE: peak-to-trough of cumulative realized.'
                  max_drawdown_realized_pct:
                    type:
                      - number
                      - 'null'
                    description: Null when running peak <= 0.
                  max_drawdown_value_sol:
                    type: number
                    description: SECONDARY, close-based equity.
                  max_drawdown_value_basis:
                    type: string
                    description: Always `close-based equity curve`.
                  active_days:
                    type: integer
        '400':
          description: Invalid parameter or malformed body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    ErrorEnvelope:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: INVALID_PARAM
            message:
              type: string
              example: >-
                use pair_address; see /api/v1/pairs?token_address=X to discover
                pools
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Preferred for swaps-api endpoints (`/swaps/*`, `/stats/*`, `/trending`,
        `/pool-events`).
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Required by the OHLCV endpoints (`/api/v1/*`) and accepted by every
        other endpoint. Send `Authorization: Bearer ohlcv_live_sk_<your_key>`.
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: >-
        Browser-friendly alternative to the Bearer header — accepted by every
        endpoint and required for WebSocket from the browser.

````