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

# Get User Positions

> Returns all active positions across protocols for a given wallet address.



## OpenAPI

````yaml openapi/defi-api.json GET /api/defi/v1/earning/positions/user-positions
openapi: 3.0.3
info:
  title: DeFi API
  version: 1.0.0
servers:
  - url: https://edge.p2p.org
security:
  - ClientHash: []
  - ApiKey: []
tags:
  - name: Earning
  - name: Positions
  - name: Rewards
  - name: Transactions
  - name: Wallets
paths:
  /api/defi/v1/earning/positions/user-positions:
    get:
      tags:
        - Positions
      summary: Get User Positions
      description: >-
        Returns all active positions across protocols for a given wallet
        address.
      operationId: get_user_positions
      parameters:
        - name: userAddress
          in: query
          required: true
          schema:
            type: string
        - name: chain
          in: query
          schema:
            type: string
        - name: protocol
          in: query
          schema:
            type: string
        - name: isAsync
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: List of user positions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      list:
                        type: array
                        items:
                          type: object
                          properties:
                            shares:
                              type: string
                            assets:
                              type: string
                            assetsUsd:
                              type: number
                            strategy:
                              type: object
                            protocol:
                              type: string
                            extraData:
                              type: object
                  error:
                    nullable: true
                    default: null
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
        '206':
          description: Partial content — some providers did not respond in time.
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: GetUserPositionListFailedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ResponseMeta:
      type: object
      properties:
        time:
          type: integer
        requestId:
          type: string
          format: uuid
    ErrorResponse:
      type: object
      properties:
        result:
          nullable: true
          default: null
        error:
          type: object
          properties:
            name:
              type: string
            message:
              type: string
            validationErrors:
              type: array
              items:
                type: object
        meta:
          $ref: '#/components/schemas/ResponseMeta'
  securitySchemes:
    ClientHash:
      type: apiKey
      in: header
      name: X-Client-Hash
    ApiKey:
      type: apiKey
      in: header
      name: apikey

````

## Related topics

- [Get Portfolio Summary](/reference/get-positions-summary.md)
- [Withdrawal](/docs/morpho-withdrawal.md)
- [Get User Rewards](/reference/get-rewards.md)
- [Getting Started](/docs/defi-api-getting-started.md)
