> ## 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.

# Mock Portfolio Value

> Get mock portfolio value endpoints for testing

## Overview

Returns mock portfolio value data for testing. This page covers both the all-chains and single-chain portfolio value endpoints.

<Warning>
  **SANDBOX**: These endpoints return mock data for testing only. Do not use for production decisions.
</Warning>

## All-Chains Portfolio Value

### Endpoint

```
GET /api/v2/sandbox/report/address/{address}/total/usd
```

### Path Parameters

<ParamField path="address" type="string" required>
  Any Ethereum address
</ParamField>

### Response

<ResponseField name="address" type="string">
  The input Ethereum address
</ResponseField>

<ResponseField name="total_asset_usd" type="number">
  Mock total portfolio value in USD
</ResponseField>

<ResponseField name="timestamp" type="string">
  ISO 8601 timestamp
</ResponseField>

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

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

  const data = await response.json();
  console.log(`Total value: $${data.total_asset_usd}`);
  ```

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

  response = requests.get(
      'https://api.credprotocol.com/api/v2/sandbox/report/address/0x742d35Cc6634C0532925a3b844Bc9e7595f0Ab17/total/usd',
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )

  data = response.json()
  print(f"Total value: ${data['total_asset_usd']}")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0Ab17",
    "timestamp": "2024-01-15T10:30:00Z",
    "total_asset_usd": 125000.50
  }
  ```
</ResponseExample>

***

## Single-Chain Portfolio Value

### Endpoint

```
GET /api/v2/sandbox/report/address/{address}/chain/{chain_id}/total/usd
```

### Path Parameters

<ParamField path="address" type="string" required>
  Any Ethereum address
</ParamField>

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

### Response

<ResponseField name="address" type="string">
  The input Ethereum address
</ResponseField>

<ResponseField name="chain_id" type="integer">
  The requested chain ID
</ResponseField>

<ResponseField name="chain_name" type="string">
  Human-readable chain name
</ResponseField>

<ResponseField name="total_asset_usd" type="number">
  Mock portfolio value on this chain
</ResponseField>

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

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

  const data = await response.json();
  console.log(`Ethereum value: $${data.total_asset_usd}`);
  ```

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

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

  data = response.json()
  print(f"Ethereum value: ${data['total_asset_usd']}")
  ```
</RequestExample>

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

## Performance

* **Response Time**: Instant (no blockchain queries)
* **Quota**: Does not count against your API quota
