Core Rendering
Get trait summary for collection
Cross Chain
Balances
Transactions
- GETGet a transaction
- GETGet transaction summary for address
- GETGet earliest transactions for address (v3)
- GETGet recent transactions for address (v3)
- GETGet paginated transactions for address (v3)
- GETGet bulk time bucket transactions for address (v3)
- GETGet all transactions in a block by page (v3)
- GETGet all transactions in a block (v3)
NFT
- Core Rendering
- Market Data
- Ownership & Token Gating
Bitcoin
Core Rendering
Get trait summary for collection
Commonly used to calculate rarity scores for a collection based on its traits.
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
Processing: Batch
Path Parameters
The chain name eg: eth-mainnet
.
The requested collection address. Passing in an ENS
, RNS
, Lens Handle
, or an Unstoppable Domain
resolves automatically.
Response
200 - application/json
Successful response
The timestamp when the response was generated. Useful to show data staleness to users.
List of response items.
Trait name
Type of the value of the trait.
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
}
]
}
]
}