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

# Get all user KVault positions

> Get a list of user positions for each Kamino Earn Vault the user has currently deposited into. Returns staked and unstaked shares.



## OpenAPI

````yaml /kamino-api.json GET /kvaults/users/{pubkey}/positions
openapi: 3.1.0
info:
  version: 1.0.0
  title: Kamino Public API
  description: >
    The Kamino API provides a comprehensive way to interact with Kamino without
    reading directly from the blockchain.


    The API also provides the ability to fetch data that might not be available
    from just reading the chain.


    The API is rate-limited for unauthenticated users. If you feel you need to
    make more requests or run into rate-limit issues, please reach out.
servers:
  - url: https://api.kamino.finance
security: []
paths:
  /kvaults/users/{pubkey}/positions:
    get:
      tags:
        - Kamino Earn User
      summary: Get all user KVault positions
      description: >-
        Get a list of user positions for each Kamino Earn Vault the user has
        currently deposited into. Returns staked and unstaked shares.
      parameters:
        - schema:
            allOf:
              - $ref: '#/components/schemas/AddressBase58'
              - description: Valid base58-encoded address of the user wallet
                example: AxqtG9SHDkZTLSWg81Sp7VqAzQpRqXtR9ziJ3VQAS8As
          required: true
          description: Valid base58-encoded address of the user wallet
          name: pubkey
          in: path
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/VaultStateArray'
                  - items:
                      type: object
                      properties:
                        vaultAddress:
                          allOf:
                            - $ref: '#/components/schemas/AddressBase58'
                            - description: Address of the Kamino Earn Vault
                              example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
                        stakedShares:
                          allOf:
                            - $ref: '#/components/schemas/Decimal'
                            - description: >-
                                The number of Kamino Earn Vault shares staked in
                                a farm
                              example: '1234.56789'
                        unstakedShares:
                          allOf:
                            - $ref: '#/components/schemas/Decimal'
                            - description: >-
                                The number of Kamino Earn Vault shares held in
                                the user wallet
                              example: '1234.56789'
                        totalShares:
                          allOf:
                            - $ref: '#/components/schemas/Decimal'
                            - description: >-
                                The total number of Kamino Earn Vault shares
                                both held and staked by the user
                              example: '1234.56789'
                      required:
                        - vaultAddress
                        - stakedShares
                        - unstakedShares
                        - totalShares
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: High-level error message describing the failure
                    example: Invalid query params
                  details:
                    type: array
                    items:
                      type: object
                      properties: {}
                    description: >-
                      Detailed validation issues (present only for validation
                      errors)
                required:
                  - error
                description: Bad request response (400)
                example:
                  error: Invalid query request
                  details:
                    - code: invalid_union
                      errors:
                        - - code: custom
                            path: []
                            message: Invalid date string
                        - - expected: number
                            code: invalid_type
                            path: []
                            message: 'Invalid input: expected number, received string'
                      path:
                        - start
                      message: Invalid input
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AddressBase58:
      type: string
      description: Market public key
      example: 9pMFoVgsG2cNiUCSBEE69iWFN7c1bz9gu9TtPeXkAMTs
    VaultStateArray:
      type: array
      items:
        type: object
        properties:
          address:
            allOf:
              - $ref: '#/components/schemas/AddressBase58'
              - description: Public key of the vault
                example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
          state:
            $ref: '#/components/schemas/The vault state object'
          programId:
            allOf:
              - $ref: '#/components/schemas/AddressBase58'
              - description: Public key of the kvault program which owns the vault
                example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
        required:
          - address
          - state
          - programId
    Decimal:
      type: string
      description: Total borrowed value in USD
      example: '1.000099969999999979181237244607594483571'
      examples:
        - '0.123'
        - '0'
        - '1'
        - '1.23'
        - '-42.0'
        - '999999.999999'
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message for internal server failure
          example: An internal error occurred
      required:
        - error
      description: Internal server error response (500)
      example:
        error: An internal error occurred
    The vault state object:
      type: object
      properties:
        vaultAdminAuthority:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Public key of the vault admin authority
              example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
        baseVaultAuthority:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Public key of the base vault authority
              example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
        baseVaultAuthorityBump:
          type: number
          description: Bump seed for the base vault authority
        tokenMint:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Public key of the token mint
              example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
        tokenMintDecimals:
          type: number
          description: Decimals of the token mint
        tokenVault:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Public key of the token vault
              example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
        tokenProgram:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Public key of the token program
              example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
        sharesMint:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Public key of the shares mint
              example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
        sharesMintDecimals:
          type: number
          description: Decimals of the shares mint
        tokenAvailable:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Amount of tokens available in the vault
              example: '1234.56789'
        sharesIssued:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Total shares issued by the vault
              example: '1234.56789'
        availableCrankFunds:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Available crank funds in the vault
              example: '1234.56789'
        performanceFeeBps:
          type: number
          description: Performance fee in basis points
        managementFeeBps:
          type: number
          description: Management fee in basis points
        lastFeeChargeTimestamp:
          type: number
          description: Timestamp of the last fee charge
        prevAum:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Previous assets under management scaled factor
              example: '1234.56789'
        pendingFees:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Pending fees scaled factor
              example: '1234.56789'
        vaultAllocationStrategy:
          type: array
          items:
            type: object
            properties:
              reserve:
                allOf:
                  - $ref: '#/components/schemas/AddressBase58'
                  - description: Public key of the reserve
                    example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
              ctokenVault:
                allOf:
                  - $ref: '#/components/schemas/AddressBase58'
                  - description: Public key of the cToken vault
                    example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
              targetAllocationWeight:
                type: number
                description: Target allocation weight as a whole number
              tokenAllocationCap:
                type: string
                description: Token allocation cap in lamports
              ctokenVaultBump:
                type: number
                description: cToken vault bump seed
              ctokenAllocation:
                type: string
                description: cToken allocation in lamports
              lastInvestSlot:
                type: string
                description: Last invest slot
              tokenTargetAllocation:
                allOf:
                  - $ref: '#/components/schemas/Decimal'
                  - description: Token target allocation scaled factor
                    example: '1234.56789'
            required:
              - reserve
              - ctokenVault
              - targetAllocationWeight
              - tokenAllocationCap
              - ctokenVaultBump
              - ctokenAllocation
              - lastInvestSlot
              - tokenTargetAllocation
            description: Vault allocation strategy entry
          description: List of vault allocation strategies
        minDepositAmount:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Minimum deposit amount in lamports
              example: '1234.56789'
        minWithdrawAmount:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Minimum withdraw amount in lamports
              example: '1234.56789'
        minInvestAmount:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Minimum invest amount in lamports
              example: '1234.56789'
        minInvestDelaySlots:
          type: number
          description: Minimum invest delay in slots
        crankFundFeePerReserve:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Crank fund fee per reserve
              example: '1234.56789'
        pendingAdmin:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Public key of the pending admin
              example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
        cumulativeEarnedInterest:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Cumulative earned interest in decimal format
              example: '1234.56789'
        cumulativeMgmtFees:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Cumulative management fees in decimal format
              example: '1234.56789'
        cumulativePerfFees:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Cumulative performance fees in decimal format
              example: '1234.56789'
        name:
          type: string
          description: Name of the vault
        vaultLookupTable:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Public key of the vault lookup table
              example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
        vaultFarm:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Public key of the vault farm
              example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
        creationTimestamp:
          type: number
          description: Timestamp of vault creation
        allocationAdmin:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Public key of the allocation admin
              example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
      required:
        - vaultAdminAuthority
        - baseVaultAuthority
        - baseVaultAuthorityBump
        - tokenMint
        - tokenMintDecimals
        - tokenVault
        - tokenProgram
        - sharesMint
        - sharesMintDecimals
        - tokenAvailable
        - sharesIssued
        - availableCrankFunds
        - performanceFeeBps
        - managementFeeBps
        - lastFeeChargeTimestamp
        - prevAum
        - pendingFees
        - vaultAllocationStrategy
        - minDepositAmount
        - minWithdrawAmount
        - minInvestAmount
        - minInvestDelaySlots
        - crankFundFeePerReserve
        - pendingAdmin
        - cumulativeEarnedInterest
        - cumulativeMgmtFees
        - cumulativePerfFees
        - name
        - vaultLookupTable
        - vaultFarm
        - creationTimestamp
        - allocationAdmin

````