getTransactionsForAddress, and stream new activity live over transactionSubscribe. You’ll try it first as an embedded demo, then build it as a full Next.js app.
Try it live
Paste your API key and any wallet address to see the three pieces working together: portfolio, history, and a live feed. This is the same data your app will render.Build it as a Next.js app
Grab the full app on GitHub
Clone the complete starter — the finished Next.js app from this walkthrough, ready to
npm install && npm run dev.Prerequisites: Node.js 18+ and a Helius API key.
1
Scaffold the project
ws for the live WebSocket feed.Add your key to .env.local:.env.local
2
Proxy RPC calls through a route handler
This keeps your API key server-side. The client posts a method and params here, and the handler runs them through the Helius SDK, which attaches your key and builds the request for you.
app/api/helius/route.ts
3
Relay the live feed over Server-Sent Events
The browser can’t open a Helius WebSocket without the key. Instead, open the WebSocket on the server and stream signatures to the client with SSE.
app/api/stream/route.ts
4
Render the dashboard
The page loads the portfolio and history through the proxy, then subscribes to the SSE feed for live updates.
app/page.tsx
5
Run it
What’s happening
One DAS call for the whole portfolio
getAssetsByOwner with showFungible: true and showNativeBalance: true returns fungible tokens, NFTs (standard and compressed), and the native SOL balance in a single response, so you don’t need separate getBalance or getTokenAccountsByOwner calls. Split items by interface to group tokens versus NFTs.
Every item carries its own metadata, so the same call powers both lists. Use content.metadata.name for the name and content.links.image for the logo or artwork. Fungible tokens also include a token_info object with the raw balance, decimals, and symbol — divide balance by 10 ** decimals for the human-readable amount. Not every token ships a name or logo, so fall back gracefully when they’re missing.
Complete history in one request
getTransactionsForAddress returns transaction history for the wallet, and with filters.tokenAccounts: "balanceChanged" it also includes transfers on the wallet’s associated token accounts, the activity a plain getSignaturesForAddress would miss. Use transactionDetails: "full" to get complete transaction data instead of just signatures.
Real-time updates without polling
transactionSubscribe pushes a message every time a transaction touches the wallet, so you never poll. Adding tokenAccounts: "balanceChanged" to the filter also matches the wallet’s token accounts, so incoming SPL transfers appear in the feed — the same activity the history call counts. Relaying the subscription through a server-side route handler keeps your API key off the client.
Next steps
getAssetsByOwner
All display options, pagination, and the full asset response shape.
getTransactionsForAddress
Advanced filtering by time, slot, token, direction, and amount.
transactionSubscribe
Filter options and payload shape for the live WebSocket feed.
Deploy your own program
Next track: ship a Solana program to devnet through Helius.