# Index Ratings

This section provides a detailed overview of the API designed to evaluate and aggregate risk ratings for a collection of tokens. Users are able to send an array comprising either token addresses or unique fingerprints that are linked to a particular index. The API processes this data to calculate and return an average risk rating, giving users insight into the risk profile associated with the specified index.

A crucial aspect of this API is its reliance on the Xerberus whitelist, meaning that only tokens listed on the Xerberus platform undergo risk evaluation. If the submitted array includes any token addresses or fingerprints that are not on the Xerberus whitelist, the API will not proceed with the analysis for those entries. Instead, it will generate a notification indicating that these specific tokens are not supported. This ensures that the risk assessment is both accurate and confined to tokens that meet Xerberus standards, maintaining a high level of data integrity and trustworthiness.

### API&#x20;

#### `/risk/rating/index`

> METHOD: POST

This endpoint provides risk score for a particular index based on its assets. The response will include the index rating and the count of the assets processed.&#x20;

Make sure to include the required headers in your request:

* **x-api-key**: Your API key.
* **x-user-email**: Your email address associated with your account.

Parameters Required:

* ecosystem - cardano/ethereum
* assets - token address or fingerprints of the address

```javascript
const axios = require('axios');

axios.post('https://api.xerberus.io/public/v1/risk/rating/index', 
{
    ecosystem: "cardano",
    assets: [
        "asset1u898rd424aqyuc4g6vdkhxh5hu86zcv2jc60ju",
        "asset17q7r59zlc3dgw0venc80pdv566q6yguw03f0d9",
        "asset1d4awq70afllw8989u999n8dvgvl5wkty5s8wkw"
    ]
}, 
{
    headers: {
        'x-user-email': 'your-email',
        'x-api-key': 'your-api-key'
    }
})
.then(response => {
    console.log(response.data);
})
.catch(error => {
    console.error(error);
});
```

**API Output Example**

```javascript
{
    "status": "success",
    "data": {
        "index_rating": "CCC",
        "processed_assets": 3
    }
}
```

**What am I seeing?**&#x20;

| Rating    | Explanation        |
| --------- | ------------------ |
| AAA - BBB | Investment Grade   |
| BB - B    | Speculative        |
| CCC - C   | Highly Speculative |
| D         | Junk               |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xerberus.gitbook.io/documentation/apis/risk-ratings-api/index-ratings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
