GET
/
v1
/
{chainName}
/
nft
/
{collectionContract}
/
traits_summary
import { GoldRushClient } from "@covalenthq/client-sdk";

const ApiServices = async () => {
    const client = new GoldRushClient("YOUR_API_KEY");
    const resp = await client.NftService.getCollectionTraitsSummary({chainName: "chainName", walletAddress: "walletAddress"});
    console.log(resp.data);
};

ApiServices();
{
  "updated_at": "2023-11-07T05:31:56Z",
  "items": [
    {
      "name": "<string>",
      "value_type": "<string>",
      "value_numeric": {
        "min": 123,
        "max": 123
      },
      "value_string": {
        "value": "<string>",
        "token_count": 123,
        "trait_percentage": 123
      },
      "attributes": [
        {
          "trait_type": "<string>",
          "values": [
            {
              "value": "<string>",
              "count": 123
            }
          ],
          "unique_values": 123
        }
      ]
    }
  ]
}
Credit Cost: 5 per call.
Processing: Batch

Path Parameters

chainName
string
required

The chain name eg: eth-mainnet.

collectionContract
string
required

The requested collection address. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically.

Response

200 - application/json
Successful response
updated_at
string

The timestamp when the response was generated. Useful to show data staleness to users.

items
object[]

List of response items.