> ## 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 user portfolio with all pools containing open positions

> Returns a paginated list of pools where the user has open (active) positions.
The response includes:
- Pool metadata (address, bin step, base fee, token symbols, icons)
- Current balances and unclaimed fees in USD and SOL
- Pool metrics (TVL, 24h volume, fee/TVL ratio)
- List of open position addresses for each pool
- Aggregated total metrics across all pools (balances, unclaimed fees, PnL) in USD and SOL
- SOL price used for conversion (omitted if unavailable)

Results can be sorted by various metrics and support pagination.

# Arguments

* `user` - The wallet address of the user
* `page` - Page number for pagination (default: 1, minimum: 1)
* `page_size` - Number of pools per page (default: 20, maximum: 50)
* `sort_by` - Field to sort by: `current_balances`, `unclaimed_fee`, `pool_tvl`,
  `pool_volume_24h`, or `fee_per_tvl_24h` (default: `current_balances`)
* `sort_direction` - Sort direction: `asc` or `desc` (default: `desc`)

# Returns

* `200` - The user's open portfolio with pool metadata, balances, and total metrics
* `400` - Invalid user address or query parameters



## OpenAPI

````yaml /developer-guides/dlmm/api-reference/openapi.json get /portfolio/open
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:
  /portfolio/open:
    get:
      tags:
        - Portfolio
      summary: Get user portfolio with all pools containing open positions
      description: >-
        Returns a paginated list of pools where the user has open (active)
        positions.

        The response includes:

        - Pool metadata (address, bin step, base fee, token symbols, icons)

        - Current balances and unclaimed fees in USD and SOL

        - Pool metrics (TVL, 24h volume, fee/TVL ratio)

        - List of open position addresses for each pool

        - Aggregated total metrics across all pools (balances, unclaimed fees,
        PnL) in USD and SOL

        - SOL price used for conversion (omitted if unavailable)


        Results can be sorted by various metrics and support pagination.


        # Arguments


        * `user` - The wallet address of the user

        * `page` - Page number for pagination (default: 1, minimum: 1)

        * `page_size` - Number of pools per page (default: 20, maximum: 50)

        * `sort_by` - Field to sort by: `current_balances`, `unclaimed_fee`,
        `pool_tvl`,
          `pool_volume_24h`, or `fee_per_tvl_24h` (default: `current_balances`)
        * `sort_direction` - Sort direction: `asc` or `desc` (default: `desc`)


        # Returns


        * `200` - The user's open portfolio with pool metadata, balances, and
        total metrics

        * `400` - Invalid user address or query parameters
      operationId: get_user_open_portfolio
      parameters:
        - name: user
          in: query
          description: User's wallet address
          required: true
          schema:
            type: string
        - 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 (default: 20, maximum: 50)'
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: sort_direction
          in: query
          description: Sort direction, default is DESC
          required: false
          schema:
            $ref: '#/components/schemas/SortDirection'
        - name: sort_by
          in: query
          description: Sort by field, default is current_balances
          required: false
          schema:
            $ref: '#/components/schemas/GetOpenPortfolioSort'
      responses:
        '200':
          description: Successfully retrieved open portfolio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOpenPortfolioResponse'
        '400':
          description: Invalid user address or query parameters
components:
  schemas:
    SortDirection:
      type: string
      enum:
        - asc
        - desc
    GetOpenPortfolioSort:
      type: string
      enum:
        - current_balances
        - unclaimed_fee
        - fee_per_tvl24h
    GetOpenPortfolioResponse:
      type: object
      required:
        - page
        - pageSize
        - hasNext
        - totalCount
        - totalPositions
        - pools
      properties:
        hasNext:
          type: boolean
        page:
          type: integer
          format: int32
          minimum: 0
        pageSize:
          type: integer
          format: int32
          minimum: 0
        pools:
          type: array
          items:
            $ref: '#/components/schemas/PoolOpenPortfolioItem'
        solPrice:
          type:
            - string
            - 'null'
        total:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TotalMetrics'
        totalCount:
          type: integer
          format: int64
          minimum: 0
        totalPositions:
          type: integer
          format: int64
          description: Total number of open positions across all pools
          minimum: 0
    PoolOpenPortfolioItem:
      type: object
      description: Aggregated portfolio data for a single pool
      required:
        - poolAddress
        - binStep
        - baseFee
        - collectFeeMode
        - tokenXMint
        - tokenYMint
        - tokenXIcon
        - tokenYIcon
        - tokenX
        - tokenY
        - rewardX
        - rewardY
        - balances
        - unclaimedFees
        - feePerTvl24h
        - pnl
        - pnlPctChange
        - totalDeposit
        - openPositionCount
        - listPositions
        - positionsOutOfRange
      properties:
        balances:
          type: string
          description: Current balance in USD
        balancesSol:
          type:
            - string
            - 'null'
          description: Current balance in SOL
        baseFee:
          type: number
          format: double
        binStep:
          type: integer
          format: int32
          minimum: 0
        collectFeeMode:
          type: integer
          format: int32
          minimum: 0
        feePerTvl24h:
          type: string
          description: User's fee per tvl in rolling 24h
        listPositions:
          type: array
          items:
            type: string
          description: List of position addresses in pool
        openPositionCount:
          type: integer
          format: int64
          description: Number of open positions
          minimum: 0
        outOfRange:
          type:
            - boolean
            - 'null'
          description: |-
            Pool dynamic fields
            Pool is out of range if one of the user's positions is out of range
            If this is None, it means we couldn't determine out_of_range status
        pnl:
          type: string
          description: Live PnL
        pnlPctChange:
          type: string
          description: Live PnL percentage change
        pnlSol:
          type:
            - string
            - 'null'
          description: Live PnL in SOL
        pnlSolPctChange:
          type:
            - string
            - 'null'
          description: Live PnL percentage change (SOL)
        poolAddress:
          type: string
        poolPrice:
          type:
            - number
            - 'null'
          format: double
          description: Current pool price
        poolStateUpdatedAtBlockTime:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        poolStateUpdatedAtSlot:
          type:
            - integer
            - 'null'
          format: int64
          description: Tracing metrics
          minimum: 0
        positionsOutOfRange:
          type: array
          items:
            type: string
          description: List of position addresses that are out of range
        rewardX:
          type: string
        rewardY:
          type: string
        tokenX:
          type: string
        tokenXIcon:
          type: string
        tokenXMint:
          type: string
        tokenY:
          type: string
        tokenYIcon:
          type: string
        tokenYMint:
          type: string
        totalDeposit:
          type: string
          description: Total deposit in USD
        totalDepositSol:
          type:
            - string
            - 'null'
          description: Total deposit in SOL (historical per-event SOL price)
        unclaimedFees:
          type: string
          description: Current unclaimed fee in USD
        unclaimedFeesSol:
          type:
            - string
            - 'null'
          description: Current unclaimed fee in SOL
    TotalMetrics:
      type: object
      description: Total metrics related to user portfolio
      required:
        - totalPositions
        - balances
        - unclaimedFees
        - pnl
        - pnlPctChange
      properties:
        balances:
          type: string
          description: Current balance in USD
        balancesSol:
          type:
            - string
            - 'null'
          description: Current balance in SOL
        pnl:
          type: string
          description: Current pnl in USD
        pnlPctChange:
          type: string
          description: PnL percent change (USD)
        pnlSol:
          type:
            - string
            - 'null'
          description: Current pnl in SOL
        pnlSolPctChange:
          type:
            - string
            - 'null'
          description: PnL percent change (SOL)
        totalPositions:
          type: integer
          format: int64
          description: Total number of open positions across all pools
          minimum: 0
        unclaimedFees:
          type: string
          description: Current unclaimed fees in USD
        unclaimedFeesSol:
          type:
            - string
            - 'null'
          description: Current unclaimed fees in SOL

````