Skip to main content
What you’ll build
  • A wallet’s total value, 24h change and chain breakdown
  • A list of token holdings with prices
  • Combined portfolio value across multiple wallets
  • Balance charts that show value over time
Time
~15 minutes
You need
  • A Zerion API key
  • One or more wallet addresses to track
  • Node.js 18+ (for native fetch)

Steps

1

Get a wallet's portfolio summary

One call to the portfolio endpoint returns the wallet’s total value, chain distribution and 24h change.
The response includes:
2

List token holdings

Fetch individual positions sorted by value. filter[trash]=only_non_trash excludes spam tokens.
Key parameters: sort=value (highest value first), filter[positions]=only_simple (wallet tokens only, excludes DeFi), filter[trash]=only_non_trash (excludes spam). Use filter[fungible_ids]=eth,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 to query specific tokens only.
No pagination needed: /positions/ returns every position in one response. It ignores page[size], and links contains only self. A large wallet can return thousands of positions (vitalik.eth returns over 6,000 with only_simple and only_non_trash), so keep the filters above to limit the response size.
3

Aggregate multiple wallets

Fetch a portfolio summary for each wallet in parallel and add them up.
The full example below also merges each wallet’s per-chain breakdown, so you can compare value across chains.
4

Fetch balance charts

The balance chart endpoint shows how portfolio value changed over time. The period is part of the URL path: day, week, month, 3months, 6months, year, 5years or max.
The response contains data.attributes.points, an array of [timestamp, value] pairs:
  • timestamp - Unix timestamp in seconds
  • value - portfolio value at that point, in USD
5

Full working example

Save as multi-wallet-tracker.mjs and run node multi-wallet-tracker.mjs. It prints the output shown at the top of this page.
multi-wallet-tracker.mjs

Next steps

  • Add DeFi positions to include staked and deposited assets in the totals.
  • Track PnL and cost basis per wallet for tax reporting.
  • Set up webhooks to update the dashboard in real time when any tracked wallet transacts.