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

# Get position PnL data (open and closed positions with on-the-fly calculation)

> Returns positions for a specific pool and user with calculated PnL values.
Includes SOL-denominated amounts when SOL price is available (omitted otherwise).
Results can be filtered by status (open/closed) and are paginated.

# Arguments

* `pool_address` - The address of the pool
* `user` - The user address
* `status` - Filter by status: "open", "closed", or omit for all (default: all)
* `page` - Page number starting from 1 (default: 1)

# Returns

* `200` - Paginated list of positions with PnL data in USD and SOL



## OpenAPI

````yaml /developer-guides/dlmm/api-reference/openapi.json get /positions/{pool_address}/pnl
openapi: 3.1.0
info:
  title: DLMM API
  description: >-
    Indexed DLMM data for pools, portfolios, positions, limit orders, wallets,
    and protocol stats.
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://dlmm.datapi.meteora.ag
    description: Production
  - url: https://dlmm.dev.metdev.io
    description: Development
security: []
paths:
  /positions/{pool_address}/pnl:
    get:
      tags:
        - Positions
      summary: >-
        Get position PnL data (open and closed positions with on-the-fly
        calculation)
      description: >-
        Returns positions for a specific pool and user with calculated PnL
        values.

        Includes SOL-denominated amounts when SOL price is available (omitted
        otherwise).

        Results can be filtered by status (open/closed) and are paginated.


        # Arguments


        * `pool_address` - The address of the pool

        * `user` - The user address

        * `status` - Filter by status: "open", "closed", or omit for all
        (default: all)

        * `page` - Page number starting from 1 (default: 1)


        # Returns


        * `200` - Paginated list of positions with PnL data in USD and SOL
      operationId: get_pool_position_pnl
      parameters:
        - name: pool_address
          in: path
          required: true
          schema:
            type: string
        - name: user
          in: query
          description: The user's wallet address
          required: true
          schema:
            type: string
        - name: status
          in: query
          description: >-
            Filter positions by status: "open", "closed", or "all" (default:
            "all")
          required: false
          schema:
            $ref: '#/components/schemas/PositionStatus'
        - name: page
          in: query
          description: 'Page number for pagination (minimum: 1, default: 1)'
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: page_size
          in: query
          description: 'Page size for pagination (minimum: 1, maximum: 100, default: 20)'
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPoolPositionPnLResponse'
components:
  schemas:
    PositionStatus:
      type: string
      enum:
        - open
        - closed
        - all
    GetPoolPositionPnLResponse:
      type: object
      required:
        - totalCount
        - page
        - pageSize
        - hasNext
        - positions
        - tokenXPrice
        - tokenYPrice
        - rewardTokenXPrice
        - rewardTokenYPrice
      properties:
        hasNext:
          type: boolean
        page:
          type: integer
          format: int32
          minimum: 0
        pageSize:
          type: integer
          format: int32
          minimum: 0
        positions:
          type: array
          items:
            $ref: '#/components/schemas/PositionPnLData'
        rewardTokenX:
          type:
            - string
            - 'null'
        rewardTokenXPrice:
          type: string
        rewardTokenY:
          type:
            - string
            - 'null'
        rewardTokenYPrice:
          type: string
        solPrice:
          type:
            - string
            - 'null'
        tokenX:
          type:
            - string
            - 'null'
        tokenXPrice:
          type: string
        tokenY:
          type:
            - string
            - 'null'
        tokenYPrice:
          type: string
        totalCount:
          type: integer
          format: int64
          minimum: 0
    PositionPnLData:
      type: object
      required:
        - positionAddress
        - minPrice
        - maxPrice
        - lowerBinId
        - upperBinId
        - feePerTvl24h
        - isClosed
        - pnlUsd
        - pnlPctChange
        - allTimeDeposits
        - allTimeWithdrawals
        - allTimeFees
      properties:
        allTimeDeposits:
          $ref: '#/components/schemas/TokenPairWithTotal'
        allTimeFees:
          $ref: '#/components/schemas/TokenPairWithTotal'
        allTimeWithdrawals:
          $ref: '#/components/schemas/TokenPairWithTotal'
        closedAt:
          type:
            - integer
            - 'null'
          format: int64
        createdAt:
          type:
            - integer
            - 'null'
          format: int64
        feePerTvl24h:
          type: string
          description: User's fee per tvl in rolling 24h
        isClosed:
          type: boolean
        isOutOfRange:
          type:
            - boolean
            - 'null'
        lowerBinId:
          type: integer
          format: int32
        maxPrice:
          type: string
        minPrice:
          type: string
        pnlPctChange:
          type: string
        pnlSol:
          type:
            - number
            - 'null'
          format: double
        pnlSolPctChange:
          type:
            - number
            - 'null'
          format: double
        pnlUsd:
          type: string
        poolActiveBinId:
          type:
            - integer
            - 'null'
          format: int32
        poolActivePrice:
          type:
            - string
            - 'null'
        positionAddress:
          type: string
        unrealizedPnl:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/UnrealizedPnL'
              description: Live PnL, only for open positions
        upperBinId:
          type: integer
          format: int32
    TokenPairWithTotal:
      type: object
      required:
        - tokenX
        - tokenY
        - total
      properties:
        tokenX:
          $ref: '#/components/schemas/TokenAmount'
        tokenY:
          $ref: '#/components/schemas/TokenAmount'
        total:
          $ref: '#/components/schemas/TotalUsd'
    UnrealizedPnL:
      type: object
      required:
        - balances
        - balanceTokenX
        - balanceTokenY
        - unclaimedFeeTokenX
        - unclaimedFeeTokenY
        - unclaimedRewardTokenX
        - unclaimedRewardTokenY
      properties:
        balanceTokenX:
          $ref: '#/components/schemas/TokenAmount'
        balanceTokenY:
          $ref: '#/components/schemas/TokenAmount'
        balances:
          type: number
          format: double
          description: Total current position balances in USD
        balancesSol:
          type:
            - string
            - 'null'
          description: Total current position balances in SOL
        unclaimedFeeTokenX:
          $ref: '#/components/schemas/TokenAmount'
        unclaimedFeeTokenY:
          $ref: '#/components/schemas/TokenAmount'
        unclaimedRewardTokenX:
          $ref: '#/components/schemas/TokenAmount'
        unclaimedRewardTokenY:
          $ref: '#/components/schemas/TokenAmount'
    TokenAmount:
      type: object
      required:
        - amount
        - usd
      properties:
        amount:
          type: string
        amountSol:
          type:
            - string
            - 'null'
        usd:
          type: string
    TotalUsd:
      type: object
      required:
        - usd
      properties:
        sol:
          type:
            - string
            - 'null'
        usd:
          type: string

````