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

# Aggregated Credit Score

> Get a single aggregated credit score for multiple Ethereum addresses

## Overview

Returns a single aggregated credit score for multiple Ethereum addresses, combining individual scores into one unified value. This is useful for multi-signature wallets, joint accounts, or portfolio-wide credit assessments.

<Info>
  Unlike the batch endpoint which returns individual scores, this endpoint aggregates all addresses into a single combined score.
</Info>

## Query Parameters

<ParamField query="address" type="string" required>
  Comma-separated list of Ethereum addresses or ENS names (e.g., `address=0x123...,0x456...,vitalik.eth`)
</ParamField>

## Response

<ResponseField name="address" type="array">
  Array of resolved Ethereum addresses (checksummed)
</ResponseField>

<ResponseField name="score" type="integer">
  Aggregated credit score between 300 and 1000 (mean of individual scores)
</ResponseField>

<ResponseField name="decile" type="integer">
  Aggregated score decile from 1 to 10
</ResponseField>

<ResponseField name="range" type="string">
  Score range: `low`, `fair`, `good`, `very_good`, or `excellent`
</ResponseField>

<ResponseField name="model_version" type="string">
  The scoring model version (currently `andromeda_1.0`)
</ResponseField>

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

## Aggregation Method

The aggregated score is calculated as the **mean** of all individual address scores:

1. Each valid address is scored individually using the Andromeda model
2. Invalid addresses are skipped (logged as warnings)
3. The final score is the arithmetic mean of all valid scores
4. Decile and range are derived from the aggregated score

## Use Cases

* **Multi-signature Wallets**: Assess the combined creditworthiness of all signers
* **Joint Account Holders**: Evaluate combined credit for shared wallets
* **Organization Assessment**: Score a company's treasury across multiple wallets
* **Portfolio Credit Rating**: Get a single score representing an entire portfolio

## Comparison: Aggregated vs Batch

| Feature       | Aggregated (`/score/`)    | Batch (`/score/batch/`)        |
| ------------- | ------------------------- | ------------------------------ |
| Output        | Single combined score     | Array of individual scores     |
| Use Case      | Portfolio-wide assessment | Per-wallet analysis            |
| Response Size | Small                     | Larger (scales with addresses) |

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.credprotocol.com/api/v2/score/?address=vitalik.eth,0x742d35Cc6634C0532925a3b844Bc9e7595f0Ab17" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const addresses = ['vitalik.eth', '0x742d35Cc6634C0532925a3b844Bc9e7595f0Ab17'];

  const response = await fetch(
    `https://api.credprotocol.com/api/v2/score/?address=${addresses.join(',')}`,
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );

  const data = await response.json();
  console.log(`Aggregated score: ${data.score}`);
  ```

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

  addresses = ['vitalik.eth', '0x742d35Cc6634C0532925a3b844Bc9e7595f0Ab17']

  response = requests.get(
      'https://api.credprotocol.com/api/v2/score/',
      params={'address': ','.join(addresses)},
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )

  data = response.json()
  print(f"Aggregated score: {data['score']}")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "address": [
      "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "0x742d35Cc6634C0532925a3b844Bc9e7595f0Ab17"
    ],
    "score": 806,
    "decile": 6,
    "range": "good",
    "model_version": "andromeda_1.0",
    "timestamp": "2024-01-15T10:30:00Z"
  }
  ```

  ```json 400 theme={null}
  {
    "error": "No valid addresses provided",
    "status_code": 400
  }
  ```
</ResponseExample>

## Performance

* **Response Time**: Typically 3-5 seconds (addresses scored in parallel)
* **Caching**: Individual address scores are cached for 5 minutes
