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
Get single NFT from contract with metadata
Commonly used to get a single NFT metadata by token ID from a collection. Useful for building NFT card displays.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.NftService.getNftMetadataForGivenTokenIdForContract({chainName: "chainName", walletAddress: "walletAddress"});
console.log(resp.data);
};
ApiServices();
{
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"is_spam": true,
"type": "<string>",
"nft_data": {
"token_id": "<string>",
"token_url": "<string>",
"original_owner": "<string>",
"current_owner": "<string>",
"external_data": {
"name": "<string>",
"description": "<string>",
"asset_url": "<string>",
"asset_file_extension": "<string>",
"asset_mime_type": "<string>",
"asset_size_bytes": "<string>",
"image": "<string>",
"image_256": "<string>",
"image_512": "<string>",
"image_1024": "<string>",
"animation_url": "<string>",
"external_url": "<string>",
"attributes": [
{
"trait_type": "<string>",
"value": "<string>"
}
],
"thumbnails": {
"image_256": "<string>",
"image_512": "<string>",
"image_1024": "<string>",
"image_opengraph_url": "<string>",
"thumbhash": "<string>"
},
"image_preview": "<string>",
"asset_properties": {
"asset_width": 123,
"asset_height": 123,
"dominant_color": "<string>"
}
},
"asset_cached": true,
"image_cached": true
}
}
],
"pagination": {
"has_more": true,
"page_number": 123,
"page_size": 123,
"total_count": 123
}
}
Processing: Realtime
Path Parameters
The chain name eg: eth-mainnet
.
The requested contract address. Passing in an ENS
, RNS
, Lens Handle
, or an Unstoppable Domain
resolves automatically.
The requested token ID.
Query Parameters
Omit metadata.
By default, this endpoint only works on chains where we've cached the assets and the metadata. When set to true
, the API will fetch metadata from upstream servers even if it's not cached - the downside being that the upstream server can block or rate limit the call and therefore resulting in time outs or slow response times on the Covalent side.
Response
The timestamp when the response was generated. Useful to show data staleness to users.
List of response items.
The string returned by the name()
method.
The ticker symbol for this contract. This field is set by a developer and non-unique across a network.
Use the relevant contract_address
to lookup prices, logos, token transfers, etc.
Denotes whether the token is suspected spam. Supports eth-mainnet
and matic-mainnet
.
b;The token's id.
The original minter.
The current holder of this NFT.
Various thumbnails of the asset.
Resized 256x256 image of the asset.
Resized 512x512 image of the asset.
Resized 1024x1024 image of the asset.
Resized image of the asset for OpenGraph.
Base64 encoded hash of the thumbnail.
The image preview URL.
If true
, the asset data is available from the Covalent CDN.
If true
, the image data is available from the Covalent CDN.
Pagination metadata.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.NftService.getNftMetadataForGivenTokenIdForContract({chainName: "chainName", walletAddress: "walletAddress"});
console.log(resp.data);
};
ApiServices();
{
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"is_spam": true,
"type": "<string>",
"nft_data": {
"token_id": "<string>",
"token_url": "<string>",
"original_owner": "<string>",
"current_owner": "<string>",
"external_data": {
"name": "<string>",
"description": "<string>",
"asset_url": "<string>",
"asset_file_extension": "<string>",
"asset_mime_type": "<string>",
"asset_size_bytes": "<string>",
"image": "<string>",
"image_256": "<string>",
"image_512": "<string>",
"image_1024": "<string>",
"animation_url": "<string>",
"external_url": "<string>",
"attributes": [
{
"trait_type": "<string>",
"value": "<string>"
}
],
"thumbnails": {
"image_256": "<string>",
"image_512": "<string>",
"image_1024": "<string>",
"image_opengraph_url": "<string>",
"thumbhash": "<string>"
},
"image_preview": "<string>",
"asset_properties": {
"asset_width": 123,
"asset_height": 123,
"dominant_color": "<string>"
}
},
"asset_cached": true,
"image_cached": true
}
}
],
"pagination": {
"has_more": true,
"page_number": 123,
"page_size": 123,
"total_count": 123
}
}