Crypto Portfolio API: A Practical Guide
What a crypto portfolio API returns, how to fetch multi-chain balances, DeFi positions and transaction history from one, and the mistakes to avoid.

Most teams that end up buying portfolio data start by trying to build it. The build usually stalls at the same place: enumerating positions is easy on one chain and miserable on fifteen.
What a portfolio API actually has to return
A wallet address is not a portfolio. A useful response resolves an address into every position it controls, priced and categorised:
| Field | Why it matters |
|---|---|
chain | Positions must be attributable per network |
protocol | An LP token is meaningless without its protocol context |
balance | Raw units, so you can re-derive value yourself |
value | Priced at a stated timestamp, not "now" |
category | Wallet, lending, staking, LP, vesting |
The last two are what separate a portfolio API from a block explorer. A balance without a timestamped price is not something you can put in a report.
Fetching a portfolio
A single request should resolve an address across every supported chain:
curl -s https://api.octav.fi/v1/portfolio \
-H "Authorization: Bearer $OCTAV_API_KEY" \
-G --data-urlencode "addresses=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"Handling the response in TypeScript:
type Position = {
chain: string;
protocol: string | null;
symbol: string;
balance: string;
value: number;
category: "wallet" | "lending" | "staking" | "lp" | "vesting";
};
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.OCTAV_API_KEY}` },
});
if (!res.ok) {
throw new Error(`Portfolio request failed: ${res.status}`);
}
const { positions } = (await res.json()) as { positions: Position[] };
// Exposure by chain — the aggregate most teams want first.
const byChain = positions.reduce<Record<string, number>>((acc, p) => {
acc[p.chain] = (acc[p.chain] ?? 0) + p.value;
return acc;
}, {});Three mistakes that show up in production
- Treating the response as live state. Prices move. Store the timestamp alongside the value, or your reports will not reconcile with each other.
- Summing LP tokens at face value. An LP position's value is a function of the pool's composition, not of the token's own price.
- Paginating naively. Addresses with long histories return large result sets; handle the cursor rather than assuming one page.
Where to go next
Octav returns this shape for the most complete set of positions of any provider we have measured: it matches DeBank's EVM DeFi depth and adds the protocols most others miss — options, perps, Derive and Solana DeFi — so the number is right on a real multi-chain wallet, not just a spot one. See the nine-provider benchmark and how to choose a crypto portfolio API.
From here, depending on what you need next:
| If you want | Go to |
|---|---|
| Every endpoint, parameter and credit cost | Endpoint reference |
| To evaluate providers before committing | How to choose a crypto portfolio API |
| Measured coverage across nine providers | The benchmark |
| A working front end on top of this data | Build a portfolio dashboard |
| Why two APIs report different net worth | Why portfolio APIs disagree |
| An agent to consume it | AI agent tools for portfolio data |
| The EVM side, where chain count is the difficulty | EVM portfolio API guide |
| The Solana side, where program decoding is | Solana portfolio API guide |
The API documentation covers authentication, rate limits and the full response schema.
Keep reading
API & DevelopersBuild a Crypto Portfolio Dashboard: A Complete Guide
Step-by-step guide to building a crypto portfolio dashboard in Next.js with the Octav API: search any wallet, decode tokens and DeFi across 50+ chains.
7 min read
API & DevelopersHow to Choose a Crypto Portfolio API
A buyer's guide to evaluating crypto portfolio APIs — the tests to run, the questions vendors dislike, and the trade-offs between coverage, cost and latency.
3 min read
API & DevelopersCrypto Portfolio API Endpoint Reference
Every Octav API endpoint with its parameters, credit cost and response, plus authentication, rate limits and caching behaviour for building on portfolio data.
2 min read