Skip to main content
After a user deposits into gtUSDa, show them what they’re earning.

Load Current Position

import { getUserCurrentBalance } from '@gauntlet-xyz/sdk'
import { VaultId } from '@gauntlet-xyz/sdk/evm'

const balances = await getUserCurrentBalance(client, {
  vaultId: VaultId.AeraUsdAlpha,
  address: '0xUser',
})

console.log(balances)
// [
//   {
//     chain: 'base',
//     token: '0xUSDCADDRESS123',
//     decimals: 6,
//     pendingDeposit: 0n,
//     balance: 1_000_000n,
//     pendingWithdraw: 0n,
//   },
// ]

Chart Return Over Time

API
const { data: portfolioCurve } = await apiGet(
  '/v1/users/0xUserWallet/positions/timeseries?interval=day&start=2026-01-01'
)
// returns:
// [
//   { timestamp: "2026-01-01", value_usd: "10000.00", roi_usd: "0" },
//   { timestamp: "2026-02-01", value_usd: "10800.00", roi_usd: "800.00" },
//   ...
// ]

const { data: vaultCurve } = await apiGet(
  `/v1/users/0xUserWallet/positions/${GTUSDA_BASE}/timeseries?interval=day&start=2026-01-01`
)
// returns:
// [
//   { timestamp: "2026-01-01", value_usd: "1000.00", roi_usd: "0" },
//   { timestamp: "2026-03-20", value_usd: "1032.00", roi_usd: "32.00" }
// ]

Show Recent Activity

API
const { data: txns } = await apiGet(
  `/v1/users/0xUserWallet/positions/${GTUSDA_BASE}/transactions?limit=20`
)
// returns:
// [
//   {
//     type: "deposit",
//     vault_id: "8453:0x000000000001cdb57e58fa75fe420a0f4d6640d5",
//     amount: "1000.00",
//     timestamp: "2026-01-15T10:30:00Z"
//   },
//   ...
// ]

What’s Next

Track Your Attribution

Monitor deposit volume and partner attribution across your integration.

User API Reference

Full user positions, timeseries, and transactions endpoints.