assets_in_vault field shows the current redeemable value, including accrued yield.
View the full API reference for the get position
endpoint.
Usage
- REST API
Display balances
Privy computes
total_deposited and total_withdrawn from the deposits and withdrawals made
through the Privy Earn deposit and
withdraw endpoints. Deposits and withdrawals made directly
onchain are not counted. assets_in_vault and shares_in_vault are read live from the vault
contract, so they include all activity. If wallets interact with a vault outside Privy Earn, see
Reading Earn vault totals onchain to compute totals that
include all activity.Calculate earned yield
To display how much yield a wallet has earned:assets_in_vault is 850 USDC:
All amounts are in the token’s smallest unit. For USDC (6 decimals), divide by
10^6 before
displaying to users. For example, 1050000 equals 1.05 USDC.Next steps
Get vault details
Retrieve vault-level information like APY, TVL, and available liquidity.

