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

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

ApiServices();
{
  "updated_at": "2023-11-07T05:31:56Z",
  "chain_id": 123,
  "chain_name": "<string>",
  "items": [
    {
      "contract_address": "<string>",
      "contract_name": "<string>",
      "is_spam": true,
      "token_total_supply": 123,
      "cached_metadata_count": 123,
      "cached_asset_count": 123,
      "last_scraped_at": "2023-11-07T05:31:56Z"
    }
  ],
  "pagination": {
    "has_more": true,
    "page_number": 123,
    "page_size": 123,
    "total_count": 123
  }
}
Credit Cost: 0.01 per call.
Processing: Batch

Path Parameters

chainName
string
required

The chain name eg: eth-mainnet.

Query Parameters

page-size
integer

Number of items per page. Omitting this parameter defaults to 100.

page-number
integer

0-indexed page number to begin pagination.

no-spam
boolean

If true, the suspected spam tokens are removed. Supports eth-mainnet and matic-mainnet.

Response

200 - application/json
Successful response
updated_at
string

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

chain_id
integer

The requested chain ID eg: 1.

chain_name
string

The requested chain name eg: eth-mainnet.

items
object[]

List of response items.

pagination
object

Pagination metadata.