Skip to main content
A drop-in mapping from the Nansen API to Octav. The biggest wins:
  • One call instead of two. Nansen splits a portfolio across POST /profiler/address/current-balance (tokens) and POST /portfolio/defi-holdings (DeFi). Octav returns wallet tokens, DeFi positions, and net worth from a single GET /v1/portfolio.
  • No double-counting. Merge Nansen’s two endpoints naively and a protocol receipt token (an aToken, say) shows up in both current-balance and inside defi-holdings, inflating the total. Octav decodes each asset once, so the numbers add up.
  • One GET, not two POSTs. Nansen wants JSON bodies on POST requests and paginates balances. Octav returns everything in one GET with no page loop.
  • Logos and P&L included. Nansen returns no token logos. Octav returns asset logos with includeImages=true, plus openPnl, closedPnl, and totalCostBasis in the same response.
Get your API key at data.octav.fi. Base URL: https://api.octav.fi/v1.

Endpoint mapping

Everything comes from a single GET /v1/portfolio call. There is no separate DeFi request to merge, and no pagination loop to unwind.

Authentication

Nansen uses an apikey header and POSTs a JSON body. Octav uses a standard Authorization: Bearer token on a GET.

Wallet token balances

Nansen’s current-balance returns a paginated data array, one row per token. In Octav, wallet tokens live under the wallet protocol, grouped by chain, and arrive in full with no page loop:
Field mapping
Nansen paginates current-balance and you loop pages until pagination.is_last_page is true. Octav returns every token in one response, so there is no page loop.

Net worth and per-chain breakdown

To get net worth from Nansen you sum the value_usd across current-balance plus the total_value_usd across defi-holdings — which is exactly where the double-count creeps in. Octav returns net worth directly on the top-level networth field, with each asset counted once, plus a per-chain breakdown under chains.
JavaScript

DeFi positions

Nansen returns decoded positions under defi-holdings.protocols[], each with a tokens[] array tagged by position_type. Octav returns the same money under assetByProtocols, keyed by protocol, then chain, then position type (LENDING, LIQUIDITYPOOL, STAKED, FARMING, …).
Field mapping
Because Octav decodes each asset once, a protocol receipt token never appears in both the wallet bucket and a DeFi position. That is the double-count you had to reconcile when merging Nansen’s two endpoints.

Transaction history

Nansen has no dedicated portfolio transaction feed to migrate from. Octav provides one at GET /v1/transactions.
Octav categorizes each transaction (swap, deposit, stake, bridge, …) and prices transfers in USD. See the transaction types reference.

Key differences

  • Calls per portfolio. Nansen: current-balance (paginated) + defi-holdings. Octav: one GET /v1/portfolio.
  • Double-counting. Merging Nansen’s two endpoints double-counts protocol receipt tokens. Octav decodes each asset once, so networth is correct out of the box.
  • HTTP shape. Nansen uses POST with JSON bodies and page loops. Octav uses a single GET with query params.
  • Chains. Both cover EVM and Solana. Octav serves them from the same endpoint and response shape.
  • Grouping. Nansen groups DeFi by protocols[]tokens[]. Octav groups assetByProtocolschainsprotocolPositionsassets[], with a dedicated wallet bucket for loose tokens.
  • Logos. Nansen returns no token logos. Octav returns them with includeImages=true.
  • Billing. Nansen bills on credits with a subscription (one of the priciest). Octav charges 1 credit per call (see pricing).
  • P&L. Octav adds openPnl, closedPnl, and totalCostBasis at no extra call.

Need help migrating?

Join our Discord

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

Portfolio endpoint

Full reference for the endpoint you’ll be calling.