Skip to main content
Look up a wallet’s deposited balance and yield. This is a read-only operation and doesn’t submit a transaction.

Prerequisites

Before you begin, ensure that you’ve: These are required so any example below runs with a valid kit and adapter.

Check your position

Pass the vault address and the wallet’s adapter and chain to query the current position:
TypeScript
You will see an output similar to:
Shell
pnl.status is a discriminated union with three values:
  • "available": P&L is computed. pnl.principalDeposited and pnl.totalYieldEarned are present.
  • "pending": P&L is still reconciling. Retry after a short delay. currentBalance and shares are still accurate.
  • "unavailable": P&L cannot be computed for this position. pnl.reason explains why. currentBalance and shares are still accurate.
You can call getPosition as often as you need. Cache the result if you’re polling frequently. Vault balances update on the vault’s own schedule, not per-block.