Wallet PnL API

Realized & Unrealized Profit and Loss, Calculated for You

250M+Usersserved40+Chainssupported2k+Teamspowered4.5k+DeFi protocolsindexed
Profit & LossAll time
+$11.4K
Net PnL
+25.38% ROI
Trades+$6.8K
DeFi yield+$4.2K
NFT sales+$1.2K
Fees paid-$848
Top positionsP&L
MOODENG
MOODENG
Moo Deng
+$7.3K
+118.40%
ETH
ETH
Ethereum
+$2.2K
+29.10%
ENS
ENS
Ethereum Name Service
+$640.3
+15.40%
KNC
KNC
Kyber Network
-$1.2K
-13.70%

Anatomy of the Wallet PnL endpoint

Returns PnL analytics for a wallet: unrealized PnL, realized PnL, net invested amount, total fees, and received/sent value, using FIFO (First In, First Out) trade matching by default — with other matching strategies available on request.

GET/v1/wallets/{address}/pnlFull reference →
Realized + unrealizedCost-basis matchingNet investedMulti-chain
Request
curl "https://api.zerion.io/v1/wallets/0xabc.../pnl" \
  -H "authorization: Basic <API_KEY>" \
  -G -d "currency=usd"
Response
{
  "data": {
    "type": "wallet-pnl",
    "attributes": {
      "unrealized_gain": 8241.10,
      "realized_gain": 3120.55,
      "net_invested": 21000.00,
      "total_fee": 412.83
    }
  }
}

Key parameters

addresspathEVM or Solana wallet address to analyze.
currencyqueryDenomination for PnL values. Defaults to usd.
filter[chain_ids]queryComma-separated chain slugs to scope the calculation.
filter[fungible_ids]queryRestrict PnL to specific assets by id.

What the Wallet PnL response gives you

One request returns enriched, ready-to-render fields — no decoding, pricing, or post-processing on your side.

Total, realized & unrealized

Three headline gain figures, computed and ready to display.

unrealized_gain

Percentage returns

Relative return on total, realized and open positions.

relative_total_gain_percentage

Invested & net invested

What was spent overall and what's tied up in current holdings.

net_invested

Fees & transfers

Total fees, external in/out and value exchanged for NFTs.

total_fee

Per-asset breakdown

The same metrics scoped to each asset, by id or implementation.

breakdown.by_id

Cost-basis matching

FIFO by default — earliest buys matched to earliest sells; other strategies on request.

realized_cost_basis

Built for production

Everything the Wallet PnL endpoint gives you to ship a real integration — filters, coverage, and predictable limits.

Methodology

Cost basis, the way accountants expect

PnL uses FIFO (First In, First Out) trade matching by default — oldest purchases matched to earliest sales — and the engine supports other matching strategies on request, so realized and unrealized figures are accurate and defensible.

  • FIFO matching by default — other strategies on request
  • Realized = matched buys vs sells
  • Unrealized = market value − matched cost of holdings
Time & filters

Any window, any asset set

Scope PnL to specific chains, assets or a custom date range.

  • since / till — millisecond timestamps
  • filter[chain_ids] — up to 25 chains
  • filter[fungible_ids] — up to 100 assets
Performance

Pre-computed for instant reads

PnL is precomputed at standard marks, so common queries return immediately.

  • Marks: now, 1d, 1w, 1m, 1y, year-to-date
  • Custom timestamps under 3,000 txs from a mark
  • Priceless assets auto-excluded, listed in meta
Limits

Built for real wallets

Clear constraints keep results correct and fast.

  • First request may return 503 — retry shortly
  • Wallets over 1M transactions unsupported
  • Max 25 chains, 100 assets per filter

What teams build with it

From dashboards to autonomous agents, teams reach for the Wallet PnL endpoint to ship faster.

Performance dashboards

Show realized and unrealized gains per wallet without building a cost-basis engine.

Tax reporting

Use cost-basis PnL and net invested figures as the basis for tax and accounting exports.

Trading analytics

Benchmark wallet performance across chains with consistent, comparable numbers.

Other endpoints

PnL (Profit and Loss)

Calculate historical gains, losses, and invested value per EVM & Solana wallet or position.

Profit & LossAll time
+$11.4K
Net PnL
+25.38% ROI
Trades+$6.8K
DeFi yield+$4.2K
NFT sales+$1.2K
Fees paid-$848
Top positionsP&L
MOODENG
MOODENG
Moo Deng
+$7.3K
+118.40%
ETH
ETH
Ethereum
+$2.2K
+29.10%
ENS
ENS
Ethereum Name Service
+$640.3
+15.40%
KNC
KNC
Kyber Network
-$1.2K
-13.70%

One API, every major chain

Ethereum, Base, Solana, Arbitrum and 45+ more networks — queried in a single call.

Ethereum logoEthereumBase logoBaseSolana logoSolanaArbitrum logoArbitrumOptimism logoOptimismEthereum logoEthereumBase logoBaseSolana logoSolanaArbitrum logoArbitrumOptimism logoOptimismEthereum logoEthereumBase logoBaseSolana logoSolanaArbitrum logoArbitrumOptimism logoOptimismEthereum logoEthereumBase logoBaseSolana logoSolanaArbitrum logoArbitrumOptimism logoOptimismEthereum logoEthereumBase logoBaseSolana logoSolanaArbitrum logoArbitrumOptimism logoOptimismEthereum logoEthereumBase logoBaseSolana logoSolanaArbitrum logoArbitrumOptimism logoOptimism
Polygon logoPolygonAvalanche logoAvalancheBNB Chain logoBNB ChainRobinhood logoRobinhoodLinea logoLineaScroll logoScrollPolygon logoPolygonAvalanche logoAvalancheBNB Chain logoBNB ChainRobinhood logoRobinhoodLinea logoLineaScroll logoScrollPolygon logoPolygonAvalanche logoAvalancheBNB Chain logoBNB ChainRobinhood logoRobinhoodLinea logoLineaScroll logoScrollPolygon logoPolygonAvalanche logoAvalancheBNB Chain logoBNB ChainRobinhood logoRobinhoodLinea logoLineaScroll logoScrollPolygon logoPolygonAvalanche logoAvalancheBNB Chain logoBNB ChainRobinhood logoRobinhoodLinea logoLineaScroll logoScrollPolygon logoPolygonAvalanche logoAvalancheBNB Chain logoBNB ChainRobinhood logoRobinhoodLinea logoLineaScroll logoScroll
Zora logoZoraCelo logoCeloGnosis logoGnosisFantom logoFantomAurora logoAuroraHyperEVM logoHyperEVMZora logoZoraCelo logoCeloGnosis logoGnosisFantom logoFantomAurora logoAuroraHyperEVM logoHyperEVMZora logoZoraCelo logoCeloGnosis logoGnosisFantom logoFantomAurora logoAuroraHyperEVM logoHyperEVMZora logoZoraCelo logoCeloGnosis logoGnosisFantom logoFantomAurora logoAuroraHyperEVM logoHyperEVMZora logoZoraCelo logoCeloGnosis logoGnosisFantom logoFantomAurora logoAuroraHyperEVM logoHyperEVMZora logoZoraCelo logoCeloGnosis logoGnosisFantom logoFantomAurora logoAuroraHyperEVM logoHyperEVM

Why builders choose the
Wallet PnL API

Ship faster

Go live in minutes, not months

Grab a free key, paste one request, and you're serving portfolio data. No nodes, no indexers, no infra to maintain.

< 5 min to first callGet a free API key

Speed

Fast everywhere your users are

A globally cached edge keeps every query fast, so your app feels instant no matter where your users open it.

~50ms median response

Freshness

Balances update in seconds

Balances, positions, and transactions land within seconds of confirmation. Never stale, never guessing.

Fresh within 1 block

Scale

Scale from one user to millions

One request spans Solana, Ethereum, Base and 50+ chains. The same endpoint carries your first user and your millionth.

50+ chains · billions of calls

Built for Consumer Scale and Enterprise Reliability

The same infrastructure that runs the Zerion wallet — sized for everything from a first prototype to fintech products in production.

1000+
RPS
SLA
Guaranteed
99.9%
Uptime

Stay ahead with the Zerion API

New endpoints, chains, and webhooks — straight to your inbox.

Simple, transparent tiers

Start building for free. Upgrade as you scale.

Developer
$0forever

For early prototypes and proofs of concept

Get Started Free
  • 2K requests / day
  • 3 RPS limit
  • Chat widget
  • Best effort support
Builder
$149/ month

For shipping MVP without running any Infrastructure

Start building
  • Up to 250K requests / month
  • 10 RPS
  • Telegram group
  • Priority support
Most popular
Startup
$499/ month

For apps preparing for launches or already in production

Start building
  • Up to 1M requests / month
  • 25 RPS
  • Slack or Telegram channel
  • Priority support
Enterprise

Custom pricing & features

For scale-ups & enterprises with high volume or custom needs

Contact sales
2.5M+ requests / month
1,000+ RPS
Slack or Telegram channel
24/7 support
99.9% uptime SLA
Dedicated account manager

DeFi Positions, Wallet Portfolio Chart, and Wallet P&L endpoints are limited to 25% of every plan quota and aren’t covered by overages.

What can you build?

Wallets & Stablecoins

Power portfolio views, transaction history, and in-app swaps with one API — across every chain and stablecoin your users hold.

Wallets & Stablecoins

Fintech & Neobanks

Add portfolio charts, PnL, and transaction history to your app — no blockchain node to stand up, no infra to maintain.

Fintech & Neobanks

AI Agents

Wallet holdings, DeFi positions, and PnL in a single call. Pay per request with x402 on Base — no subscriptions, no keys.

AI Agents
Join 2,000+ teams building on Zerion

Built for developers.
Trusted by enterprises.

Give wallets, AI agents, and consumer apps reliable access to wallets, positions, transactions, and DeFi data across chains.

FAQ

If you have any questions