> For the complete documentation index, see [llms.txt](https://docs-unified.crypto-chief.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-unified.crypto-chief.com/guides/wallet-portfolio.md). Agents can also search and read this documentation through its [MCP server](https://docs-unified.crypto-chief.com/~gitbook/mcp).

# Wallet Portfolio Across Networks

## Wallet Portfolio Across Networks

A wallet screen needs the coins and tokens a user holds on every network, their value, and an honest signal when part of the picture is missing.

### 1. Find the networks

One address string can be valid on several networks: an EVM address is valid on all twelve EVM networks. [`GET /v1/addresses/{address}`](https://docs-unified.crypto-chief.com/api-reference/addresses.md) without `include` tells where — free, nothing is read from a network:

```bash
curl -s "https://api-unified.crypto-chief.com/v1/addresses/0x1f33a8b5c6d7e8f90123456789abcdef012393c9?networks=mainnets" \
  -H "X-API-Key: $CC_API_KEY"
```

Keep the networks where the user actually has activity; balances are charged per network.

### 2. Read the balances

```bash
curl -s "https://api-unified.crypto-chief.com/v1/addresses/0x1f33a8b5c6d7e8f90123456789abcdef012393c9/balances?networks=ETH_MAINNET,BSC_MAINNET,POLYGON_MAINNET,ARBITRUM_ONE&include=fiat&listed=true" \
  -H "X-API-Key: $CC_API_KEY"
```

* `include=fiat` adds `quote` and `value_fiat` to each item and `total_fiat` to the response.
* `listed=true` keeps catalog assets only. Spam classification is not yet filled, so this is the filter against airdropped junk tokens. Without it, every token the address holds is returned.
* A user with addresses on several families — an EVM address, a TRON address, a TON address — needs one call per address, or one [batch](https://docs-unified.crypto-chief.com/api-reference/balances.md#batch-balances) of address–network pairs.

### 3. Show what is known, and say what is not

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const { http, data } = await api("GET", `/addresses/${address}/balances`, {
  networks: "ETH_MAINNET,BSC_MAINNET,POLYGON_MAINNET,ARBITRUM_ONE",
  include: "fiat",
  listed: true,
});
if (http !== 200) throw new Error(`${data.error}: ${data.message}`);

const rows = data.items.map((b) => ({
  network: b.network,
  symbol: b.asset.symbol ?? b.asset.id,
  amount: b.amount.value,          // a decimal string: display it, do not parse it as a float
  usd: b.value_fiat?.value ?? null, // null: no verified price, not zero
}));

const failed = data.networks.filter((n) => n.status === "error").map((n) => n.network);
const total = data.total_fiat?.value ?? "0";
const label = data.complete ? total : `at least ${total}`;
// Show `failed` as "temporarily unavailable" and retry them after their retry_after.
```

{% endtab %}

{% tab title="Python" %}

```python
status, data, _ = api("GET", f"/addresses/{address}/balances", {
    "networks": "ETH_MAINNET,BSC_MAINNET,POLYGON_MAINNET,ARBITRUM_ONE",
    "include": "fiat",
    "listed": True,
})
if status != 200:
    raise RuntimeError(f"{data.get('error')}: {data.get('message')}")

rows = [{
    "network": b["network"],
    "symbol": b["asset"]["symbol"] or b["asset"]["id"],
    "amount": b["amount"]["value"],                     # a decimal string
    "usd": (b.get("value_fiat") or {}).get("value"),    # None: no verified price, not zero
} for b in data["items"]]

failed = [n["network"] for n in data["networks"] if n["status"] == "error"]
total = (data["total_fiat"] or {}).get("value", "0")
label = total if data["complete"] else f"at least {total}"
```

{% endtab %}
{% endtabs %}

* `complete: false` means a network failed or an asset has no price. The total is then a lower bound — show it as one.
* A network with `status: "error"` is unknown, not empty. It was refunded; read it again after `retry_after`.
* `locked` is part of `amount` that cannot be spent: frozen TRX, the XRP Ledger reserve. Show the spendable part as `amount − locked`.

### 4. History of one asset

The activity tab is [address transfers](https://docs-unified.crypto-chief.com/api-reference/address-history.md#transfers) filtered by asset, priced at the time of each block:

```bash
curl -s "https://api-unified.crypto-chief.com/v1/addresses/0x1f33a8b5c6d7e8f90123456789abcdef012393c9/transfers?networks=ETH_MAINNET&assets=ETH_MAINNET/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&include=fiat&min_stage=found&limit=20" \
  -H "X-API-Key: $CC_API_KEY"
```

`min_stage=found` shows new transfers as soon as their block exists; display `stage` next to them until it is `final`.

### 5. A portfolio at a past date

On networks with `capabilities.balances.at` — EVM, XRP Ledger and UTXO networks — `at` returns balances as of a time. On EVM, name the tokens with `assets`:

```bash
curl -s "https://api-unified.crypto-chief.com/v1/addresses/0x1f33a8b5c6d7e8f90123456789abcdef012393c9/balances?networks=ETH_MAINNET&assets=ETH_MAINNET/native,ETH_MAINNET/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&at=2026-10-31T23:59:59Z&include=fiat" \
  -H "X-API-Key: $CC_API_KEY"
```

Prices in that response are those of `at`.
