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

# Get account vault performance metrics

> **User Experience Function**: Retrieves comprehensive performance metrics for a specific account's position in a vault including current position value, ROI, APY across different periods (24h, 7d, 30d, since inception), total deposits/withdrawals, interest earned, and historical time series data tracking position value over time.



## OpenAPI

````yaml GET /account/{walletAddress}/vault/{vaultAddress}
openapi: 3.0.0
info:
  title: DeFindex API
  description: API documentation for DeFindex endpoints
  version: 1.0.0
  contact: {}
  x-logo:
    url: https://links.paltalabs.io/defindex-full.svg
    backgroundColor: '#0e0e0e'
    altText: DeFindex Logo
    href: https://defindex.io
servers: []
security: []
tags: []
paths:
  /account/{walletAddress}/vault/{vaultAddress}:
    get:
      tags:
        - Historical Data
      summary: Get account vault performance metrics
      description: >-
        **User Experience Function**: Retrieves comprehensive performance
        metrics for a specific account's position in a vault including current
        position value, ROI, APY across different periods (24h, 7d, 30d, since
        inception), total deposits/withdrawals, interest earned, and historical
        time series data tracking position value over time.
      operationId: HistoricalDataController_getAccountVaultPerformance
      parameters:
        - name: walletAddress
          required: true
          in: path
          description: Account wallet address (Stellar address)
          schema:
            example: GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY
            type: string
        - name: vaultAddress
          required: true
          in: path
          description: Vault contract address
          schema:
            example: CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3
            type: string
        - name: network
          required: true
          in: query
          description: Stellar network to query (mainnet or testnet)
          schema:
            enum:
              - testnet
              - mainnet
            type: string
        - name: interval
          required: false
          in: query
          description: >-
            Data aggregation interval: hourly, daily, weekly, or monthly.
            Default: daily
          schema:
            enum:
              - hourly
              - daily
              - weekly
              - monthly
            type: string
        - name: startDate
          required: false
          in: query
          description: >-
            Start date in ISO 8601 format (default: account first deposit).
            Example: 2025-10-08T00:00:00.000Z
          schema:
            example: '2025-10-08T00:00:00.000Z'
            type: string
        - name: endDate
          required: false
          in: query
          description: >-
            End date in ISO 8601 format (default: current time). Example:
            2025-12-10T00:00:00.000Z
          schema:
            example: '2025-12-10T00:00:00.000Z'
            type: string
        - name: includeEvents
          required: false
          in: query
          description: >-
            Include transaction events (deposits/withdrawals) in historical data
            points. Default: false
          schema:
            default: false
            example: false
            type: boolean
      responses:
        '200':
          description: Account vault performance retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  accountAddress:
                    type: string
                    description: Account wallet address
                    example: GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY
                  vaultAddress:
                    type: string
                    description: Vault contract address
                    example: CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3
                  vaultName:
                    type: string
                    description: Vault display name
                    example: DeFindex-Vault-BeansUsdcVault
                  vaultSymbol:
                    type: string
                    description: Vault token symbol
                    example: BNSUSDC
                  interval:
                    type: string
                    description: Data aggregation interval used
                    example: daily
                  currentPosition:
                    type: object
                    description: Current account position in the vault
                    properties:
                      shares:
                        type: string
                        description: Number of vault shares (dfTokens) owned by the account
                        example: '12630722725'
                      estimatedValue:
                        type: string
                        description: >-
                          Estimated current value of the position in smallest
                          asset unit
                        example: '13588103705'
                      estimatedValueDisplay:
                        type: string
                        description: Estimated current value formatted for display
                        example: 1,358.81
                      assets:
                        type: array
                        description: Asset breakdown of the position
                        items:
                          type: object
                          properties:
                            tokenAddress:
                              type: string
                              description: Asset contract address
                              example: >-
                                CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75
                            symbol:
                              type: string
                              description: Asset symbol
                              example: USDC
                            name:
                              type: string
                              description: Asset name
                              example: USD Coin
                            decimals:
                              type: number
                              description: Asset decimal places
                              example: 7
                            amount:
                              type: string
                              description: Amount in smallest asset unit
                              example: '13588103705'
                            amountDisplay:
                              type: string
                              description: Amount formatted for display
                              example: 1,358.81
                            estimatedValue:
                              type: string
                              description: Estimated value in smallest asset unit
                              example: '13588103705'
                            estimatedValueDisplay:
                              type: string
                              description: Estimated value formatted for display
                              example: 1,358.81
                      lastUpdated:
                        type: string
                        description: Timestamp of last position update (ISO 8601)
                        example: '2025-12-10T19:27:59.277Z'
                  performance:
                    type: object
                    description: Account performance metrics
                    properties:
                      roi:
                        type: number
                        description: >-
                          Return on Investment as a percentage (e.g., 1.879 =
                          1.879% ROI). Calculated as: ((positionValue -
                          netDeposits) / netDeposits) * 100
                        example: 1.8790635838174747
                      totalDeposited:
                        type: string
                        description: Total deposited amount in smallest asset unit
                        example: '14988309232'
                      totalDepositedDisplay:
                        type: string
                        description: Total deposited formatted for display
                        example: 1,498.83
                      totalWithdrawn:
                        type: string
                        description: Total withdrawn amount in smallest asset unit
                        example: '1650825330'
                      totalWithdrawnDisplay:
                        type: string
                        description: Total withdrawn formatted for display
                        example: '165.08'
                      totalInterestEarned:
                        type: string
                        description: Total interest earned in smallest asset unit
                        example: '250619803'
                      totalInterestEarnedDisplay:
                        type: string
                        description: Total interest earned formatted for display
                        example: '25.06'
                      netDeposits:
                        type: string
                        description: >-
                          Net deposits (deposits - withdrawals) in smallest
                          asset unit
                        example: '13337483902'
                      netDepositsDisplay:
                        type: string
                        description: Net deposits formatted for display
                        example: 1,333.74
                      period24h:
                        type: object
                        description: 24-hour period performance metrics
                        properties:
                          apy:
                            type: number
                            nullable: true
                            description: 24-hour Annual Percentage Yield (%)
                            example: 20.57381881828393
                          interestEarned:
                            type: string
                            description: >-
                              Interest earned in 24h period (smallest asset
                              unit)
                            example: '6963216'
                          interestEarnedDisplay:
                            type: string
                            description: Interest earned formatted for display
                            example: '0.69'
                          deposits:
                            type: string
                            description: Deposits in 24h period (smallest asset unit)
                            example: '0'
                          depositsDisplay:
                            type: string
                            description: Deposits formatted for display
                            example: '0.00'
                          withdrawals:
                            type: string
                            description: Withdrawals in 24h period (smallest asset unit)
                            example: '0'
                          withdrawalsDisplay:
                            type: string
                            description: Withdrawals formatted for display
                            example: '0.00'
                      period7d:
                        type: object
                        description: 7-day period performance metrics
                        properties:
                          apy:
                            type: number
                            nullable: true
                            description: 7-day Annual Percentage Yield (%)
                            example: 36.87846441682105
                          interestEarned:
                            type: string
                            description: Interest earned in 7d period (smallest asset unit)
                            example: '68887294'
                          interestEarnedDisplay:
                            type: string
                            description: Interest earned formatted for display
                            example: '6.88'
                          deposits:
                            type: string
                            description: Deposits in 7d period (smallest asset unit)
                            example: '2111400000'
                          depositsDisplay:
                            type: string
                            description: Deposits formatted for display
                            example: '211.14'
                          withdrawals:
                            type: string
                            description: Withdrawals in 7d period (smallest asset unit)
                            example: '0'
                          withdrawalsDisplay:
                            type: string
                            description: Withdrawals formatted for display
                            example: '0.00'
                      period30d:
                        type: object
                        description: 30-day period performance metrics
                        properties:
                          apy:
                            type: number
                            nullable: true
                            description: 30-day Annual Percentage Yield (%)
                            example: 20.211924094493995
                          interestEarned:
                            type: string
                            description: >-
                              Interest earned in 30d period (smallest asset
                              unit)
                            example: '154563081'
                          interestEarnedDisplay:
                            type: string
                            description: Interest earned formatted for display
                            example: '15.45'
                          deposits:
                            type: string
                            description: Deposits in 30d period (smallest asset unit)
                            example: '3745425032'
                          depositsDisplay:
                            type: string
                            description: Deposits formatted for display
                            example: '374.54'
                          withdrawals:
                            type: string
                            description: Withdrawals in 30d period (smallest asset unit)
                            example: '450225024'
                          withdrawalsDisplay:
                            type: string
                            description: Withdrawals formatted for display
                            example: '45.02'
                      sinceInception:
                        type: object
                        description: Performance metrics since account first deposit
                        properties:
                          days:
                            type: number
                            description: Number of days since first deposit
                            example: 63
                          totalReturn:
                            type: number
                            description: >-
                              Total return since inception as a percentage
                              (e.g., 1.879 = 1.879% return). This is the same
                              value as ROI, representing the return from first
                              deposit to current time
                            example: 1.8790635838174747
                          interestEarned:
                            type: string
                            description: >-
                              Total interest earned since inception (smallest
                              asset unit)
                            example: '250619803'
                          interestEarnedDisplay:
                            type: string
                            description: Total interest earned formatted for display
                            example: '25.06'
                  data:
                    type: array
                    description: >-
                      Historical time series data points tracking account
                      position over time
                    items:
                      type: object
                      properties:
                        timestamp:
                          type: string
                          description: Timestamp for this data point (ISO 8601)
                          example: '2025-10-08T00:00:00.000Z'
                        shares:
                          type: string
                          description: Number of vault shares owned at this timestamp
                          example: '955783508'
                        positionValue:
                          type: string
                          description: >-
                            Position value at this timestamp in smallest asset
                            unit
                          example: '999999999'
                        positionValueDisplay:
                          type: string
                          description: Position value formatted for display
                          example: '99.99'
                        vaultPPS:
                          type: number
                          description: Vault Price Per Share at this timestamp
                          example: 1.046262036074933
                        netDeposits:
                          type: string
                          description: >-
                            Cumulative net deposits (deposits - withdrawals) at
                            this timestamp
                          example: '1000000000'
                        netDepositsDisplay:
                          type: string
                          description: Cumulative net deposits formatted for display
                          example: '100.00'
                        interestEarned:
                          type: string
                          description: Cumulative interest earned up to this timestamp
                          example: '-1'
                        interestEarnedDisplay:
                          type: string
                          description: Cumulative interest earned formatted for display
                          example: '-0.00'
                        interestEarnedPeriod:
                          type: string
                          description: >-
                            Interest earned in this period/interval (smallest
                            asset unit)
                          example: '0'
                        interestEarnedPeriodDisplay:
                          type: string
                          description: Interest earned in period formatted for display
                          example: '0.00'
                        changeFromPrevious:
                          type: number
                          nullable: true
                          description: >-
                            Percentage change from previous data point (null for
                            first point or periods with no activity)
                          example: 200.0368128000368
                        event:
                          type: object
                          nullable: true
                          description: >-
                            Transaction event at this timestamp (only included
                            when includeEvents=true)
                          properties:
                            type:
                              type: string
                              enum:
                                - deposit
                                - withdraw
                              description: Transaction type
                              example: deposit
                            dfTokenAmount:
                              type: string
                              description: >-
                                Vault token (dfToken) amount involved in the
                                transaction
                              example: '955783508'
                            assets:
                              type: array
                              description: Assets involved in the transaction
                              items:
                                type: object
                                properties:
                                  tokenAddress:
                                    type: string
                                    description: Asset contract address
                                    example: >-
                                      CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75
                                  symbol:
                                    type: string
                                    description: Asset symbol
                                    example: USDC
                                  amount:
                                    type: string
                                    description: Asset amount in smallest unit
                                    example: '1000000000'
                            transactionId:
                              type: string
                              description: Stellar transaction hash
                              example: >-
                                d558071bd5bcdca4fb5d3f09c15af899c07b524b0c80d9a5547e70a5b1020d2e
                example:
                  accountAddress: GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY
                  vaultAddress: CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3
                  vaultName: DeFindex-Vault-BeansUsdcVault
                  vaultSymbol: BNSUSDC
                  interval: daily
                  currentPosition:
                    shares: '12630722725'
                    estimatedValue: '13588103705'
                    estimatedValueDisplay: 1,358.81
                    assets:
                      - tokenAddress: >-
                          CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75
                        symbol: USDC
                        name: USD Coin
                        decimals: 7
                        amount: '13588103705'
                        amountDisplay: 1,358.81
                        estimatedValue: '13588103705'
                        estimatedValueDisplay: 1,358.81
                    lastUpdated: '2025-12-10T19:27:59.277Z'
                  performance:
                    roi: 1.8790635838174747
                    totalDeposited: '14988309232'
                    totalDepositedDisplay: 1,498.83
                    totalWithdrawn: '1650825330'
                    totalWithdrawnDisplay: '165.08'
                    totalInterestEarned: '250619803'
                    totalInterestEarnedDisplay: '25.06'
                    netDeposits: '13337483902'
                    netDepositsDisplay: 1,333.74
                    period24h:
                      apy: 20.57381881828393
                      interestEarned: '6963216'
                      interestEarnedDisplay: '0.69'
                      deposits: '0'
                      depositsDisplay: '0.00'
                      withdrawals: '0'
                      withdrawalsDisplay: '0.00'
                    period7d:
                      apy: 36.87846441682105
                      interestEarned: '68887294'
                      interestEarnedDisplay: '6.88'
                      deposits: '2111400000'
                      depositsDisplay: '211.14'
                      withdrawals: '0'
                      withdrawalsDisplay: '0.00'
                    period30d:
                      apy: 20.211924094493995
                      interestEarned: '154563081'
                      interestEarnedDisplay: '15.45'
                      deposits: '3745425032'
                      depositsDisplay: '374.54'
                      withdrawals: '450225024'
                      withdrawalsDisplay: '45.02'
                    sinceInception:
                      days: 63
                      totalReturn: 1.8790635838174747
                      interestEarned: '250619803'
                      interestEarnedDisplay: '25.06'
                  data:
                    - timestamp: '2025-10-08T00:00:00.000Z'
                      shares: '955783508'
                      positionValue: '999999999'
                      positionValueDisplay: '99.99'
                      vaultPPS: 1.046262036074933
                      netDeposits: '1000000000'
                      netDepositsDisplay: '100.00'
                      interestEarned: '-1'
                      interestEarnedDisplay: '-0.00'
                      interestEarnedPeriod: '0'
                      interestEarnedPeriodDisplay: '0.00'
                      changeFromPrevious: null
                      event:
                        type: deposit
                        dfTokenAmount: '955783508'
                        assets:
                          - tokenAddress: >-
                              CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75
                            symbol: USDC
                            amount: '1000000000'
                        transactionId: >-
                          d558071bd5bcdca4fb5d3f09c15af899c07b524b0c80d9a5547e70a5b1020d2e
        '400':
          description: Invalid parameters (invalid date format, invalid interval value)
        '404':
          description: Account has no transactions in vault or vault not found

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.