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

# Get vault portfolio

> Current vault share positions and PnL for an account.

### Parameters

| Parameter | Required | Type | Description |
| --------- | -------- | ---- | ----------- |
| account | yes | string (hex) | Account address whose vault positions should be returned. |
| vault | yes | string (hex) | Optional vault address filter. |

### Response fields

| Parameter | Required | Type | Description |
| --------- | -------- | ---- | ----------- |
| `positions` | yes | object[] | Current vault positions for the requested account. |
| `positions[].deposits` | yes | string | Total deposits recorded for this account/vault. |
| `positions[].pnl` | yes | string | Current vault PnL: `value + withdrawals - deposits`. |
| `positions[].shares` | yes | string | Current account share balance in this vault. |
| `positions[].totalShares` | yes | string | Current total outstanding shares for this vault. |
| `positions[].value` | yes | string | Current value of the account's shares. |
| `positions[].vault` | yes | string (hex) | Vault address. |
| `positions[].vaultEquity` | yes | string | Latest indexed vault equity. |
| `positions[].withdrawals` | yes | string | Total withdrawals recorded for this account/vault. |

### Response example

A sample **`200`** response body is attached to this operation as an OpenAPI **example** — see the **Example** panel on this page.



## OpenAPI

````yaml /specs/indexer-openapi.json get /vault-portfolio
openapi: 3.1.0
info:
  title: Rocket Indexer API Documentation
  description: >-
    Welcome to the RocketChain Indexer API documentation!


    The indexer REST API serves historical and aggregated market data from
    ClickHouse. Endpoints cover candles, trades, order history, portfolio
    curves, funding events, bridge events, vault events, current/historical
    instruments, and live instrument details.
  license:
    name: MIT
    url: https://github.com/rocketfoundation/rocket-sdk-rust/blob/main/LICENSE
  version: '1.0'
  x-logo:
    altText: ROCKET
    backgroundColor: '#00000000'
    url: https://www.rocketfoundation.io/assets/rocket-logo.svg
servers:
  - url: https://beta.rocket-cluster-1.com/indexer
    description: Beta
  - url: https://testnet.rocket-cluster-1.com/indexer
    description: Testnet
  - url: https://devnet.rocket-cluster-1.com/indexer
    description: Devnet
security: []
tags:
  - name: Indexer REST-API
    description: >-
      Read-only REST endpoints backed by the RocketChain indexer. All routes are
      served over HTTP GET.
paths:
  /vault-portfolio:
    get:
      tags:
        - Indexer REST-API
      summary: Get vault portfolio
      description: >-
        Current vault share positions and PnL for an account.


        ### Parameters


        | Parameter | Required | Type | Description |

        | --------- | -------- | ---- | ----------- |

        | account | yes | string (hex) | Account address whose vault positions
        should be returned. |

        | vault | yes | string (hex) | Optional vault address filter. |


        ### Response fields


        | Parameter | Required | Type | Description |

        | --------- | -------- | ---- | ----------- |

        | `positions` | yes | object[] | Current vault positions for the
        requested account. |

        | `positions[].deposits` | yes | string | Total deposits recorded for
        this account/vault. |

        | `positions[].pnl` | yes | string | Current vault PnL: `value +
        withdrawals - deposits`. |

        | `positions[].shares` | yes | string | Current account share balance in
        this vault. |

        | `positions[].totalShares` | yes | string | Current total outstanding
        shares for this vault. |

        | `positions[].value` | yes | string | Current value of the account's
        shares. |

        | `positions[].vault` | yes | string (hex) | Vault address. |

        | `positions[].vaultEquity` | yes | string | Latest indexed vault
        equity. |

        | `positions[].withdrawals` | yes | string | Total withdrawals recorded
        for this account/vault. |


        ### Response example


        A sample **`200`** response body is attached to this operation as an
        OpenAPI **example** — see the **Example** panel on this page.
      operationId: getVaultPortfolio
      parameters:
        - name: account
          in: path
          description: Account address whose vault positions should be returned.
          required: true
          schema:
            type: string
            format: hex
          example: '0xd6963dda208f0f36acd13cce5bbc26720c8b612f'
        - name: vault
          in: path
          description: Optional vault address filter.
          required: true
          schema:
            type: string
            format: hex
          example: '0xf19e16fe3cf25c630f55f66d6c6cbf64f84fc86b'
      responses:
        '200':
          description: Vault portfolio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetVaultPortfolioResponse'
              example:
                positions:
                  - deposits: '5000'
                    pnl: '1000'
                    shares: '500000'
                    totalShares: '1000000'
                    value: '6000'
                    vault: '0xf19e16fe3cf25c630f55f66d6c6cbf64f84fc86b'
                    vaultEquity: '12000'
                    withdrawals: '0'
        '500':
          description: Internal server error
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    GetVaultPortfolioResponse:
      type: object
      required:
        - positions
      properties:
        positions:
          type: array
          items:
            $ref: '#/components/schemas/VaultPortfolioPosition'
          description: Current vault positions for the requested account.
      examples:
        - positions:
            - deposits: '5000'
              pnl: '1000'
              shares: '500000'
              totalShares: '1000000'
              value: '6000'
              vault: '0xf19e16fe3cf25c630f55f66d6c6cbf64f84fc86b'
              vaultEquity: '12000'
              withdrawals: '0'
    VaultPortfolioPosition:
      type: object
      required:
        - vault
        - shares
        - totalShares
        - vaultEquity
        - value
        - deposits
        - withdrawals
        - pnl
      properties:
        deposits:
          type: string
          description: Total deposits recorded for this account/vault.
        pnl:
          type: string
          description: 'Current vault PnL: `value + withdrawals - deposits`.'
        shares:
          type: string
          description: Current account share balance in this vault.
        totalShares:
          type: string
          description: Current total outstanding shares for this vault.
        value:
          type: string
          description: Current value of the account's shares.
        vault:
          type: string
          format: hex
          description: Vault address.
        vaultEquity:
          type: string
          description: Latest indexed vault equity.
        withdrawals:
          type: string
          description: Total withdrawals recorded for this account/vault.

````