> ## Documentation Index
> Fetch the complete documentation index at: https://docs.credprotocol.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Chain Portfolio Value

> Get the total USD portfolio value for a specific blockchain

## Overview

Returns the total USD value of assets held by an address on a specific blockchain network. This is the fastest way to check holdings on a single chain.

<Info>
  Same pricing and inclusion rules as the all-chains portfolio endpoints, but scoped to a single network.
</Info>

## Path Parameters

<ParamField path="address" type="string" required>
  Ethereum address or ENS name (e.g., `vitalik.eth` or `0x742d35Cc6634C0532925a3b844Bc454e4438f44e`)
</ParamField>

<ParamField path="chain_id" type="integer" required>
  The chain ID to fetch data from (e.g., `1` for Ethereum mainnet)
</ParamField>

## Supported Chain IDs

| Network   | Chain ID |
| --------- | -------- |
| Ethereum  | 1        |
| Optimism  | 10       |
| BNB Chain | 56       |
| Polygon   | 137      |
| Base      | 8453     |
| Celo      | 42220    |
| Arbitrum  | 42161    |
| Avalanche | 43114    |
| Scroll    | 534352   |
| Linea     | 59144    |

## Response

<ResponseField name="address" type="string">
  The resolved Ethereum address (checksummed)
</ResponseField>

<ResponseField name="timestamp" type="string">
  ISO 8601 timestamp when the value was calculated
</ResponseField>

<ResponseField name="chains" type="array">
  Array containing the single chain's data
</ResponseField>

<ResponseField name="chains[].chain_id" type="integer">
  The requested chain ID
</ResponseField>

<ResponseField name="chains[].chain_name" type="string">
  Human-readable chain name
</ResponseField>

<ResponseField name="chains[].total_asset_usd" type="number">
  Total asset value on this chain in USD
</ResponseField>

## Included Assets

| Asset Type          | Included |
| ------------------- | -------- |
| Native tokens       | Yes      |
| ERC-20 tokens       | Yes      |
| Stablecoins         | Yes      |
| LP tokens           | Yes      |
| Wrapped tokens      | Yes      |
| Collateral deposits | Yes      |
| NFTs                | No       |
| Debt positions      | No       |

## Use Cases

* **Chain-Specific Monitoring**: Track holdings on a specific L2
* **Pre-Transaction Check**: Verify balance before bridging
* **Gas Planning**: Check native token balance for gas
* **Protocol Analysis**: Monitor holdings on specific chains

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.credprotocol.com/api/v2/report/address/vitalik.eth/chain/1/total/usd" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.credprotocol.com/api/v2/report/address/vitalik.eth/chain/1/total/usd', {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  });

  const data = await response.json();
  const ethereumValue = data.chains[0].total_asset_usd;
  console.log(`Ethereum holdings: $${ethereumValue.toLocaleString()}`);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.credprotocol.com/api/v2/report/address/vitalik.eth/chain/1/total/usd',
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )

  data = response.json()
  ethereum_value = data['chains'][0]['total_asset_usd']
  print(f"Ethereum holdings: ${ethereum_value:,.2f}")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "timestamp": "2024-01-15T10:30:00Z",
    "chains": [
      {
        "chain_id": 1,
        "chain_name": "Ethereum",
        "total_asset_usd": 85000.50
      }
    ]
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Unsupported chain: 999"
  }
  ```
</ResponseExample>

## Performance

* **Response Time**: \< 1 second
* **Caching**: Results cached for 5 minutes per address+chain combination
