Skip to main content
If you’ve been calling Allium’s Realtime APIs for wallet balances, transactions, DeFi positions, PnL, or token prices, the same data is available on Zerion API across 60+ EVM chains and Solana, usually in a single call and with USD values precomputed. This guide shows the direct mapping for the main Allium Realtime endpoints, with copy-pasteable code for each. What you get with Zerion:
  • One address, all chains: Allium takes a {chain, address} pair per wallet, so a multi-chain balance read means one entry per chain. Zerion returns every supported chain for an address in one call to /wallets/{address}/positions/, filterable with filter[chain_ids].
  • One call for tokens + DeFi: Collapse Allium’s wallet/balances and wallet/positions into a single /positions/?filter[positions]=no_filter response.
  • Values precomputed: Allium balances return raw_balance (and a token.price you multiply yourself). Zerion returns quantity.float and value (USD) per position, plus a portfolio breakdown by chain and type.

Endpoint parity

Prefer not to write code? The Zerion CLI wraps the same endpoints with a one-shot npx @zerion/cli init flow, useful for quick experiments and AI agents.

A note on request shape

The biggest structural change is how you address a wallet:
  • Allium: POST an array of {chain, address} objects. You pick the chain per wallet, and you can batch up to 100 wallets in one request.
  • Zerion: GET /v1/wallets/{address}/... with the address in the path. One address per call, all supported chains by default, narrowed with filter[chain_ids]. To read many wallets in one request, use the wallet sets endpoints.
So a single Allium call that fans out across [{ethereum, 0x…}, {polygon, 0x…}] for one wallet becomes a single Zerion call to that address (both chains already included), and a single Allium call across several different wallets becomes either N Zerion calls or one wallet-set call.

Token balances

Allium’s wallet/balances returns one item per token with raw_balance (an integer) and a token object that carries price but no precomputed USD value. Zerion returns a JSON:API collection where each token is one entry under data[], with attributes.fungible_info for metadata, attributes.quantity.float for the decimal-adjusted amount, and attributes.value for the USD value already computed. The same endpoint accepts both EVM and Solana addresses.

Field mapping

price and value are null for tokens without a reliable price. Guard for null before summing or formatting.

Transactions

Allium’s wallet/transactions returns transactions with asset_transfers[] (each tagged sent/received), a labels[] array, and an activities[] array describing what the transaction did (dex_trade, nft_trade, asset_approval, and so on). Zerion’s /transactions/ returns enriched, human-readable transactions with a single decoded operation_type, inlined transfer metadata, fees, and the dApp when Zerion recognizes it. The same endpoint accepts both EVM and Solana addresses.

Field mapping

Filter mapping

DeFi positions

Allium’s wallet/positions returns typed positions, where the field set depends on position_type (LP, lending, staked, regular, perp, vault). Lending positions nest supplies[], borrows[], and collateral[]; LP positions carry token0/token1; staked positions carry staked_token and rewards_token. Zerion flattens all of this: each position is one row under /positions/?filter[positions]=only_complex, tagged with protocol, protocol_module, and position_type (including loan for borrowed assets).

Field mapping

Allium returns dedicated perp positions (size, entry/mark price, leverage, liquidation price, unrealized PnL). Zerion’s positions model is spot and DeFi-protocol oriented and does not return perpetuals as positions. If perps matter for your migration, let us know.

Holdings PnL

Allium’s wallet/pnl returns per-token PnL (realized_pnl, unrealized_pnl, average_cost) plus wallet totals. Zerion’s /pnl returns wallet-level PnL computed with FIFO: realized and unrealized gain, net invested, total fees, and external in/out flows.

Field mapping

Allium’s wallet/pnl accepts a batch of wallets and returns per-token rows. To replicate a per-token breakdown on Zerion, call /pnl with filter[fungible_ids]=…. See the wallet PnL tracker recipe for a worked example.

Token prices

Allium’s prices endpoint takes a batch of {token_address, chain} objects and returns the latest price with OHLC. Zerion resolves a token by its implementation and returns full asset metadata including market_data.price and recent changes.

Field mapping

Allium’s prices endpoint batches up to 200 tokens per request. Zerion’s by-implementation resolves one token per call. For a batch, query /v1/fungibles/ and read market_data.price from each result, or cache the Zerion fungible_id per token and reuse it.

Pagination

Replace Allium’s cursor query parameter with Zerion’s links.next URL. Each Zerion response includes a fully-formed next-page link you can fetch as-is.

Realtime updates

Allium offers a streaming product for low-latency blockchain data. Zerion offers transaction webhooks: subscribe a callback URL to one or more wallets and receive a POST when any of them transact. See the wallet activity alerts recipe for a working example.

Differences from Allium

Most Allium Realtime use cases have a direct Zerion equivalent. A few aren’t covered, and others behave differently. Worth a scan before you cut over. Not supported today:
  • Non-EVM, non-Solana chains: Allium Realtime covers chains like Bitcoin, Stellar, NEAR, and Sui. Zerion covers EVM chains and Solana. Check the supported chains list for the ones you rely on.
  • Perpetuals: Allium returns perp positions with leverage, mark price, and liquidation price. Zerion’s positions model does not return perpetuals.
  • Per-token historical balance snapshots: Allium’s wallet/balances/history returns point-in-time token balances. Zerion exposes wallet value over time via /charts/{period} and asset price history via the fungible chart, but not a per-token balance-at-timestamp endpoint.
  • OHLC price candles: Allium’s prices endpoint returns open/high/low/close per interval. Zerion returns live price plus a chart timeseries, not OHLC candles.
  • Liquidity and holder analytics: Allium exposes total_liquidity_usd and holders_count on tokens. Zerion does not return pool liquidity or holder counts.
If any of these matter for your migration, let us know. Your feedback helps shape our roadmap. Worth knowing:
  • Authentication: Allium uses an X-API-KEY header. Zerion uses HTTP Basic Auth. Get a key at dashboard.zerion.io.
  • Request shape: Allium endpoints are POST with a JSON array of {chain, address} objects. Zerion endpoints are GET /v1/wallets/{address}/... with the address in the path. See the note above.
  • One address spans all chains: Allium pairs each address with one chain. Zerion returns every supported chain for an address by default, narrowed with filter[chain_ids].
  • Multiple wallets: Allium batches up to 100 wallets per call. Zerion reads one address per /wallets/ call; for batches use the wallet sets endpoints.
  • Values precomputed: Allium balances return raw_balance and a token.price; you divide by 10^decimals and multiply. Zerion returns quantity.float and value (USD) per position.
  • One endpoint for tokens and DeFi: Zerion serves both wallet tokens and DeFi positions from /positions/. Switch via filter[positions]=only_simple (wallet only), only_complex (DeFi only), or no_filter (both).
  • Flattened DeFi: Allium returns typed positions with nested supplies/borrows/collateral. Zerion returns one row per position tagged with protocol_module and position_type (including loan for debt). Group by relationships.dapp.data.id to reconstruct protocols, and by group_id to reconstruct LP pairs.
  • Chain IDs: Allium and Zerion both use lowercase string chain IDs (e.g. ethereum, solana), so most map 1:1. Confirm the longer-tail names against the full list.
  • Response shape: Zerion uses JSON:API. Payloads live under data[].attributes with related entities under data[].relationships.
  • Spam filtering: Allium gates dust with min_liquidity / with_liquidity_info. Zerion uses filter[trash]=only_non_trash. See spam filtering for the full taxonomy.
  • Pagination: Allium pages with a cursor query parameter; Zerion returns a fully-formed links.next URL you can fetch as-is. See pagination.

Get in touch

Have a use case we don’t cover or need assistance with the migration? Our team is happy to help! Reach out via the chat widget on dashboard.zerion.io, or email us.