> For the complete documentation index, see [llms.txt](https://docs.wasabi.xyz/public-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wasabi.xyz/public-api/api-reference/nft-metadata/list-asset-rarities.md).

# List Asset Rarities

Fetch asset rarity data for a given contract address and optional asset id filters.

## List Asset Rarity

<mark style="color:blue;">`GET`</mark> `https://api.dkoda.xyz/v1/asset/rarity`

Fetches the asset rarity data for a given collection and optional asset filters.

#### Query Parameters

| Name                                                | Type    | Description                                                                                                                                                                                                                      |
| --------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| contractAddress\*<mark style="color:red;">\*</mark> | String  | <p>The contract address of the collection.</p><p>e.g. "0x23581767a106ae21c074b2276d25e5c3e136a68b"</p>                                                                                                                           |
| assetId                                             | String  | <p>A comma-separated list of assets to filter appraisals with. If not provided, the appraisals for all assets in the collection will be fetched. You can provide up to 20 asset ids in one call.</p><p>e.g. "1749,1783,5123"</p> |
| limit                                               | Integer | A limit on the number of sales to be returned. Limit can range between 1 and 50.  The default is 20.                                                                                                                             |
| cursor                                              | String  | A cursor value to use to fetch the next page. If no cursor is provided, the first page will be fetched.                                                                                                                          |

#### Headers

| Name                                          | Type   | Description                              |
| --------------------------------------------- | ------ | ---------------------------------------- |
| x-api-key\*<mark style="color:red;">\*</mark> | String | The API key to use when making requests. |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
  "successful": 1,
  "nextPage": "MTIzOTF1ODIzOTgxMnUzOTE4MnUzOTEyMw==",
  "data": [
    {
      "contractAddress": "0x23581767a106ae21c074b2276d25e5c3e136a68b",
      "assetId": "0",
      "currentOwner": "0x7b557aa52d0055d84b1e3f5487d9018f318372c1",
      "rarityScore": 6.993832180399276,
      "statisticalRarity": -6.1747070670036,
      "rarityRank": 4485
    },
    {
      "contractAddress": "0x23581767a106ae21c074b2276d25e5c3e136a68b",
      "assetId": "1",
      "currentOwner": "0x7b557aa52d0055d84b1e3f5487d9018f318372c1",
      "rarityScore": 12.796537744198615,
      "statisticalRarity": -7.091747803729937,
      "rarityRank": 2144
    },
    {
      "contractAddress": "0x23581767a106ae21c074b2276d25e5c3e136a68b",
      "assetId": "2",
      "currentOwner": "0x43c2b4f5a43b9a786a49d5d0bfbcb3f83b2a2898",
      "rarityScore": 4.089210229588192,
      "statisticalRarity": -5.687839526249058,
      "rarityRank": 6577
    }
  ]
}
```

{% endtab %}

{% tab title="400: Bad Request Bad request" %}

```javascript
{
  "successful": 0,
  "errorMessage": "Invalid contract address. Please ensure the contract address is a valid Ethereum address."
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized" %}

```javascript
{
  "successful": 0,
  "errorMessage": "No API key is specified, please contact us at developer@dkoda.xyz to request an API key."
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Good to know:** This endpoint requires an API key to be present in the request header. Please contact us to request one.
{% endhint %}

{% hint style="warning" %}
**Good to know:** The `limit` and `cursor` query parameters will ignored when an `assetId` query parameter is supplied.
{% endhint %}
