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

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

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

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

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

What am I seeing?

Rating
Explanation

AAA - A

Investment Grade

BBB - B

Speculative

CCC - C

Highly Speculative

D

Junk

Last updated