Skip to main content
A drop-in mapping from the Mobula API to Octav. The biggest wins:
  • One call instead of two. Mobula splits a portfolio across wallet/portfolio (tokens) and wallet/defi-positions (DeFi). Octav returns wallet tokens, DeFi positions, and net worth from a single GET /v1/portfolio.
  • Reliable DeFi coverage. Mobula’s DeFi decoding is inconsistent run-to-run. Octav decodes positions consistently across chains and protocols.
  • Sanity-checked pricing. Mobula can emit long-tail price outliers — a single mispriced defunct token can blow up your total. Octav validates pricing so networth stays trustworthy.
  • P&L and cost basis come back in the same response.
Get your API key at data.octav.fi. Base URL: https://api.octav.fi/v1.

Endpoint mapping

Tokens and DeFi both come from a single GET /v1/portfolio call. There is no separate positions request to merge.

Authentication

Mobula uses a raw Authorization header (no scheme prefix). Octav uses a standard Authorization: Bearer token.

Wallet token balances

Mobula’s wallet/portfolio returns data.assets[], a flat array of tokens with per-chain splits in cross_chain_balances. In Octav, wallet tokens live under the wallet protocol, already grouped by chain:
Field mapping

Net worth and per-chain breakdown

In Mobula you add data.total_wallet_balance (from wallet/portfolio) to the DeFi positions total to get a full net worth. Octav returns the already-summed networth, plus a per-chain breakdown in chains.
JavaScript

DeFi positions

Mobula returns DeFi from a second call, wallet/defi-positions, as an array of { protocol, positions[] }. Octav returns the same money in the first response under assetByProtocols, keyed by protocol, then chain, then position type (LENDING, LIQUIDITYPOOL, STAKED, FARMING, …).
Field mapping
Mobula’s DeFi coverage varies between runs and can miss protocols. Octav decodes positions consistently and folds every protocol into the same assetByProtocols map, so you never call a second endpoint.

Transaction history

Swap Mobula’s wallet/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

  • Calls per portfolio. Mobula: wallet/portfolio + wallet/defi-positions. Octav: one GET /v1/portfolio.
  • DeFi reliability. Mobula’s DeFi decoding is inconsistent run-to-run. Octav decodes positions consistently.
  • Pricing. Mobula can emit long-tail price outliers that distort totals. Octav sanity-checks pricing so networth stays trustworthy.
  • Auth header. Mobula sends the raw key in Authorization. Octav uses Authorization: Bearer <key>.
  • Chains. Both cover EVM and Solana. Octav returns them in the same shape from one endpoint.
  • Chain ids. Mobula formats DeFi chain ids like evm:1; strip the evm: prefix for the numeric id. Octav keys chains by name (ethereum) with chainId alongside.
  • Grouping. Mobula returns data.assets[] (tokens) and a separate defi-positions[] array. Octav groups assetByProtocolschainsprotocolPositionsassets[], with a dedicated wallet bucket for loose tokens.
  • Billing. Mobula charges roughly 1 credit per chain. 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 Mobula response shape and we’ll map it.

Portfolio endpoint

Full reference for the endpoint you’ll be calling.