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

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

ApiServices();
{
  "updated_at": "2023-11-07T05:31:56Z",
  "items": [
    {
      "trait_type": "<string>",
      "values": [
        {
          "value": "<string>",
          "count": 123
        }
      ],
      "unique_values": 123
    }
  ]
}
Credit Cost: 2 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.

trait
string
required

The requested trait.

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.