Skip to main content
A drop-in mapping from the Zerion API to Octav. The biggest wins:
  • A flat, already-priced object. Zerion returns JSON:API (data[].attributes, related entities via relationships) that you traverse and stitch together. Octav returns a flat object where every asset is already USD-priced from a single GET /v1/portfolio.
  • Compact responses. Zerion payloads can grow very large. Octav responses stay compact.
  • Decode once, no double-counting. On LST and vault wallets Zerion can surface a receipt token as a wallet position and again as its decoded deposit/staked position, so a naive sum counts it twice. Octav decodes each asset once.
  • Deeper protocol decoding. Perps, options, and complex positions come back fully decoded, and P&L and cost basis ship in the same response.
Get your API key at data.octav.fi. Base URL: https://api.octav.fi/v1.

Endpoint mapping

Everything except history comes from a single GET /v1/portfolio call. There is no only_simple / only_complex filter to run twice and merge.

Authentication

Zerion uses HTTP Basic auth: your API key followed by a colon, base64-encoded, in an Authorization: Basic header. Octav uses a standard Authorization: Bearer token.

Wallet token balances

Zerion’s only_simple positions return a JSON:API array where each token lives under data[].attributes. In Octav, wallet tokens live under the wallet protocol, grouped by chain:
Field mapping

Net worth and per-chain breakdown

Zerion’s /portfolio endpoint maps directly onto the top-level networth and chains fields returned by the same portfolio call.
JavaScript

DeFi positions

Zerion returns decoded positions under only_complex, each with a position_type (deposit, loan, staked, reward, locked). Octav returns the same money under assetByProtocols, keyed by protocol, then chain, then position type (LENDING, LIQUIDITYPOOL, STAKED, FARMING, …).
Field mapping
On LST and vault wallets, Zerion can list a receipt token twice — once as a wallet position and again as its decoded deposit/staked position. Octav decodes each asset once, so summing assetByProtocols never double-counts.

Transaction history

Swap GET /wallets/{address}/transactions for GET /v1/transactions.
Octav categorizes each transaction (swap, deposit, stake, bridge, …) and prices transfers in USD. See the transaction types reference.

Key differences

  • Response shape. Zerion returns JSON:API — you walk data[].attributes and resolve related entities through relationships. Octav returns a flat object; no JSON:API traversal.
  • Payload size. Zerion responses can be very large. Octav responses stay compact.
  • Values. Zerion’s attributes.value can be null; Octav returns a populated value (and price) on every asset.
  • Decode once. Zerion may surface an LST/vault receipt token as both a wallet and a deposit/staked position. Octav decodes each asset once, so naive sums don’t double-count.
  • Grouping. Zerion splits only_simple vs only_complex and groups by position_type. Octav groups assetByProtocolschainsprotocolPositionsassets[], with a dedicated wallet bucket for loose tokens.
  • Chains. Both cover EVM and Solana. Octav serves both from one flat response and shape.
  • Billing. Octav charges 1 credit per call (see pricing).
  • P&L. Octav adds openPnl, closedPnl, and totalCostBasis at no extra call.
  • NFTs. Octav’s /portfolio focuses on fungible assets and DeFi positions; it does not enumerate NFTs the way Zerion’s /nft-positions does.

Need help migrating?

Join our Discord

Share your Zerion response shape and we’ll map it.

Portfolio endpoint

Full reference for the endpoint you’ll be calling.