Snapshot a Wallet's SOL and SPL Token Holdings
A 3-step recipe with Solana. We can help you get access.
Recipe · 3 steps
Snapshot a Wallet's SOL and SPL Token Holdings
with Solana
Build a holdings snapshot for a single wallet address.
- Read the wallet's native SOL balance in lamports.
- Enumerate every SPL Token account owned by the wallet, parsed so mint and amount are readable without decoding account data by hand.
- Resolve the balance of the wallet's first token account, returning the raw amount alongside the mint's decimals and a display-ready string.
What you'll need to have ready
- ownerAddress: Base58-encoded wallet public key that owns the accounts.
- tokenProgramId: The token program that owns the token accounts.
For your developer
Arazzo workflow solana:wallet-portfolio, 3 operations: getBalance → getTokenAccountsByOwner → getTokenAccountBalance. Specs on APIs.io.