Skip to main content

Reading User Position Data

Retrieve user positions, balances, and transaction history using the Kamino SDK and API.
Historical vault data is only available via the API.
1

Get User Positions

Retrieves user share balances across all vaults. Uses the SDK to query the user’s positions in every vault they hold shares in.
Using the SDK requires a private RPC connection or the public rate-limited RPC endpoint.
getUserPositions
View Code
2

Get User Vault Position

Retrieves user share balance and token value for a specific vault. Uses the SDK to calculate both shares held and their equivalent token amount.
getUserVaultPosition
View Code
3

Get User Vault Transactions

Queries transaction history for a specific user and vault over a time range. Returns time-series data including position changes and transaction details.
getUserVaultTransactions
View Code
4

Get User Total Metrics History

Queries cumulative performance metrics for a user across all vaults over a time range. Returns aggregated time-series data including total positions and earnings.
getUserTotalMetricsHistory
View Code
5

Get User Vault Metrics History

Retrieves historical performance metrics for a specific user and vault. Returns time-series data including shares, APY, and cumulative interest earned.
getUserVaultMetricsHistory
View Code
6

Get User Vault PnL

Retrieves current profit and loss data for a user’s position in a specific vault. Returns PnL metrics in USD, SOL, and token denominations.
getUserVaultPnL
View Code
7

Get User Vault PnL History

Queries historical profit and loss data for a user’s vault position. Returns transaction-level PnL history with cost basis, realized gains, and position values.
getUserVaultPnLHistory
View Code

Additional Resources

API Examples

SDK Examples