Multi-chain portfolio tracking and DeFi position monitoring for AI agents — unified balances across 10+ EVM chains with real-time USD valuations.
Autonomous agents operating across multiple blockchains need a unified view of their holdings. Querying each chain individually is slow, error-prone, and requires maintaining separate RPC connections. Zerion solves this with a single API call.
Zerion provides the ideal portfolio layer for agent wallets:
One API call returns balances across Ethereum, Base, Polygon, Arbitrum, Optimism, and more. No chain-by-chain queries.
Every token balance comes with its current USD value. Agents can make spending decisions based on actual portfolio worth.
Ethereum, Base, Polygon, Arbitrum, Optimism, Avalanche, BNB Chain, Fantom, zkSync, and more covered out of the box.
Tracks lending, staking, LP positions, and yield farming. Agents see their full financial picture, not just token balances.
Filters out sub-penny token positions automatically. Agents only see meaningful balances that matter for decision-making.
Clean REST endpoints with Basic auth. No complex SDK setup, no WebSocket requirements. One API key, one HTTP call.
Aegis integrates Zerion as one of three balance providers alongside Uniblock and Allium. Each provider covers different chains and use cases, with Zerion handling the EVM multi-chain aggregation layer.
Zerion queries all EVM chains for a given agent wallet in a single call. This feeds into the unified balance view that powers budget enforcement and spending decisions.
Aegis budget policies operate in USD. Zerion provides real-time token-to-USD conversion so budget thresholds and spending limits work across any token on any chain.
The Aegis Nexus dashboard shows each agent's wallet balances. Zerion data populates the EVM balance cards with chain, token, amount, and USD value.
Build a complete view of agent holdings across all EVM chains. See every token, LP position, and staking balance in one place with live USD values.
getZerionPortfolio(agentWallet) → unified balance card
Track total agent portfolio value against spending limits. Automatically pause agents when their total holdings drop below the configured budget floor.
totalUSD < budgetFloor → agent.pause()
Agents monitoring the same token across multiple chains can detect price discrepancies and act on arbitrage opportunities in real time.
ETH on Base vs Arbitrum → price delta alert
Aggregate balances across an entire fleet of agents. Track total organization value, identify idle capital, and rebalance across agents.
fleet.map(getZerionPortfolio) → totalTreasury
The getZerionPortfolio function queries all positions for a wallet address and returns normalized balance objects.
import { getZerionPortfolio } from "@aegis-ows/integrations";
const balances = await getZerionPortfolio("0x1234...");
// Returns:
// [
// {
// chain: "Ethereum",
// token: "ETH",
// balance: "1.500000",
// usdValue: "4500.00",
// source: "zerion"
// },
// {
// chain: "Base",
// token: "USDC",
// balance: "100.000000",
// usdValue: "100.00",
// source: "zerion"
// }
// ]/wallets/{address}/positions/ endpoint with Basic authethereum, base) to human-readable namesChainBalance type with chain, token, balance, usdValue, and source fieldsNote: Zerion covers EVM chains only. For Solana balances, Aegis uses Uniblock. For historical and indexed data, Aegis uses Allium. The getAllBalances function combines all three sources automatically.
Aegis queries Zerion, Uniblock, and Allium in parallel and deduplicates the results. When multiple sources report the same token on the same chain, Aegis keeps the entry with the highest USD value (most recent price data).
import { getAllBalances } from "@aegis-ows/integrations";
const balances = await getAllBalances({
evm: "0x1234...",
solana: "2G55...",
});
// Queries Zerion + Uniblock + Allium in parallel
// Deduplicates: keeps highest USD value per chain:token pair
// Returns unified ChainBalance[] across all chains| Source | Chains Covered | Primary Use |
|---|---|---|
| Zerion | All EVM chains | Real-time multi-chain EVM portfolio |
| Uniblock | EVM + Solana | Solana coverage, EVM fallback |
| Allium | EVM + Solana | Indexed historical data, analytics |
Getting Zerion working with Aegis requires a single environment variable. The integration handles auth encoding and endpoint configuration automatically.
Sign up at zerion.io/developers and create a new API key. Free tier is available for development and testing.
ZERION_API_KEY=zk_dev_xxxxxxxxxxxxxxxxZerion uses Basic auth. The integration base64-encodes your API key with a trailing colon (key + ":") and sends it as the Authorization: Basic ... header. You do not need to handle encoding yourself.
| Variable | Required | Description |
|---|---|---|
| ZERION_API_KEY | Yes | Your Zerion developer API key from zerion.io/developers |
Rate limits vary by plan. Check the Zerion developer docs for current limits on your tier.
Building with Zerion + Aegis for a hackathon? Here are high-impact project ideas organized by track.
AI agents that check their Zerion portfolio before making purchases. Budget decisions informed by real-time multi-chain net worth, not just a single wallet balance.
Agents that monitor portfolio allocations via Zerion and automatically rebalance when drift exceeds thresholds. Combine with Aegis budget policies for risk limits.
Cross-chain wealth tracking dashboard for agent fleets. Aggregate Zerion data across dozens of agent wallets to show total organization value, chain distribution, and token exposure.
Agents that adjust their behavior based on portfolio value. Conservative when holdings are low, aggressive when flush. Zerion provides the real-time valuation input.
The Zerion integration exposes a single function. It handles auth, pagination, dust filtering, and chain ID mapping internally.
| Function | Parameters | Returns | Description |
|---|---|---|---|
| getZerionPortfolio | walletAddress: string | ChainBalance[] | Fetches all positions for a wallet across EVM chains. Filters dust, maps chain IDs, returns normalized balances with USD values. |
interface ChainBalance {
chain: string; // Human-readable chain name ("Ethereum", "Base", ...)
token: string; // Token symbol ("ETH", "USDC", ...)
balance: string; // Token amount as decimal string
usdValue: string; // USD value as decimal string
source: "zerion" | "uniblock" | "allium";
}