Skip to main content
Once Privy confirms a deposit, your app can query the wallet’s holdings using the get position endpoint. The assets_in_vault field shows the current redeemable value, including accrued yield.
View the full API reference for the get position endpoint.

Usage

To check a wallet’s position via REST API, make a GET request to:
https://auth.privy.io/api/v1/wallets/{wallet_id}/ethereum_yield_vault?vault_id={vault_id}

Parameters

vault_id
string
required
The unique identifier for the vault.

Returns

asset
object
The vault’s underlying asset, with address and symbol fields.
total_deposited
string
Total amount deposited into the vault, in the token’s smallest unit.
total_withdrawn
string
Total amount withdrawn from the vault, in the token’s smallest unit.
assets_in_vault
string
Current redeemable value of the wallet’s vault shares, including accrued yield.
shares_in_vault
string
Number of vault shares held by the wallet.

Example

curl https://auth.privy.io/api/v1/wallets/{wallet_id}/ethereum_yield_vault?vault_id={vault_id} \
  -H "privy-app-id: <your-app-id>" \
  -H "Authorization: Basic <credentials>"
Example response
{
  "asset": {
    "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "symbol": "USDC"
  },
  "total_deposited": "1000000",
  "total_withdrawn": "0",
  "assets_in_vault": "1050000",
  "shares_in_vault": "1000000000000000000"
}

Display balances

FieldWhat it representsHow to use it
assets_in_vaultCurrent redeemable value including yieldShow this as the user’s current balance
total_depositedSum of all depositsUse as the user’s cost basis
total_withdrawnSum of all withdrawalsSubtract from total_deposited for net contributions
shares_in_vaultRaw vault shares heldRarely shown to users — use assets_in_vault instead

Calculate earned yield

To display how much yield a wallet has earned:
earned_yield = assets_in_vault - (total_deposited - total_withdrawn)
For example, if a wallet deposited 1,000 USDC, withdrew 200 USDC, and assets_in_vault is 850 USDC:
earned_yield = 850 - (1000 - 200) = 850 - 800 = 50 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.