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

# Get user PnL

> Handles `GET /v1/users/{user_pubkey}/pnl` via `get.v1.users.by_user_pubkey.pnl`.



## OpenAPI

````yaml /openapi/phoenix-public-api.json get /v1/users/{user_pubkey}/pnl
openapi: 3.1.0
info:
  title: Phoenix Eternal API
  description: >-
    RESTful API for accessing Phoenix Eternal perpetual trading data. Provides
    real-time orderbook levels, asset information, and market metadata.
  termsOfService: https://www.phoenix.trade/terms-of-service
  contact:
    name: Phoenix Development Team
    url: https://github.com/Ellipsis-Labs/phoenix
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://perp-api.phoenix.trade
    description: Phoenix Eternal Perp API
security: []
tags:
  - name: Auth
    description: Wallet and session authentication.
  - name: Exchange
    description: Exchange, market, candle, and no-referral register-instruction workflows.
  - name: Invite
    description: Invite validation, referral activation, and wallet allowlist checks.
  - name: Notifications
    description: Trader notification reads and acknowledgement helpers.
  - name: Trader
    description: Trader state, account history, and transaction builders.
externalDocs:
  url: https://docs.phoenix.trade
  description: Phoenix developer documentation
paths:
  /v1/users/{user_pubkey}/pnl:
    get:
      tags:
        - Trader
      summary: Get user PnL
      description: >-
        Handles `GET /v1/users/{user_pubkey}/pnl` via
        `get.v1.users.by_user_pubkey.pnl`.
      operationId: get.v1.users.by_user_pubkey.pnl
      parameters:
        - name: user_pubkey
          in: path
          description: User public key (base58 encoded)
          required: true
          schema:
            type: string
        - name: resolution
          in: query
          description: 'Resolution/timeframe: 1m, 1d'
          required: true
          schema:
            type: string
        - name: startTime
          in: query
          description: 'Start time in milliseconds since Unix epoch (max range: 1 year)'
          required: false
          schema:
            type: integer
            format: int64
        - name: endTime
          in: query
          description: 'End time in milliseconds since Unix epoch (max range: 1 year)'
          required: false
          schema:
            type: integer
            format: int64
        - name: limit
          in: query
          description: 'Max number of data points (default: 1000, max: 1440)'
          required: false
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PnLPoint'
      security:
        - PhoenixBearerAuth: []
components:
  schemas:
    PnLPoint:
      type: object
      description: PnL data point
      required:
        - timestamp
        - startTime
        - endTime
        - cumulativePnl
        - unrealizedPnl
        - cumulativeFundingPayment
        - cumulativeTakerFee
      properties:
        cumulativeFundingPayment:
          type: number
          format: double
          description: Cumulative funding payment up to this point
        cumulativePnl:
          type: number
          format: double
          description: Cumulative realized PnL up to this point
        cumulativeTakerFee:
          type: number
          format: double
          description: Cumulative taker fees paid up to this point
        endTime:
          type: integer
          format: int64
          description: End time in seconds since Unix epoch
        startTime:
          type: integer
          format: int64
          description: Start time in seconds since Unix epoch
        timestamp:
          type: integer
          format: int64
          description: 'Deprecated: Unix timestamp in seconds.'
        unrealizedPnl:
          type: number
          format: double
          description: unrealized PnL up to this point
  securitySchemes:
    PhoenixBearerAuth:
      type: http
      scheme: bearer
      description: Bearer access token issued by `/v1/auth/*` login endpoints.

````