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 token balances for address
Commonly used to fetch the native, fungible (ERC20), and non-fungible (ERC721 & ERC1155) tokens held by an address. Response includes spot prices and other metadata.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.BalanceService.getTokenBalancesForWalletAddress({chainName: "chainName", walletAddress: "walletAddress"});
console.log(resp.data);
};
ApiServices();
{
"address": "<string>",
"chain_id": 123,
"chain_name": "<string>",
"quote_currency": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"contract_display_name": "<string>",
"supports_erc": [
"<string>"
],
"logo_url": "<string>",
"logo_urls": {
"token_logo_url": "<string>",
"protocol_logo_url": "<string>",
"chain_logo_url": "<string>"
},
"last_transferred_at": "2023-11-07T05:31:56Z",
"native_token": true,
"type": "<string>",
"is_spam": true,
"balance": "<string>",
"balance_24h": "<string>",
"quote_rate": 123,
"quote_rate_24h": 123,
"quote": 123,
"quote_24h": 123,
"pretty_quote": "<string>",
"pretty_quote_24h": "<string>",
"protocol_metadata": {
"protocol_name": "<string>"
},
"nft_data": [
{
"token_id": "<string>",
"token_balance": "<string>",
"token_url": "<string>",
"supports_erc": [
"<string>"
],
"token_price_wei": "<string>",
"token_quote_rate_eth": "<string>",
"original_owner": "<string>",
"external_data": {
"name": "<string>",
"description": "<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>"
},
"owner": "<string>"
},
"owner": "<string>",
"owner_address": "<string>",
"burned": true
}
]
}
]
}
Processing: Realtime
Comparing GoldRush’s Token Balances API to RPC Providers
Building a Web3 Portfolio Tracker with the GoldRush API
Building Web3 Wallets (Part 1) - Token Displays
Building Web3 Wallets (Part 2) - Curve LP Token Balances
How to Block NFT Spam
Comprehensive Guide to Bitcoin Wallet Lookup and Transaction Tracking
Understanding Web3 Wallets with GoldRush
How to Get Bitcoin Balances and Transactions
Calculate Crypto Cost Basis and Capital Gains with GoldRush
DIY - Build Your Own Crypto Tax Calculator with Google Sheets
How to Use Covalent’s Wallet Transaction Analysis Tool
Path Parameters
The chain name eg: eth-mainnet
.
The requested address. Passing in an ENS
, RNS
, Lens Handle
, or an Unstoppable Domain
resolves automatically.
Query Parameters
The currency to convert. Supports USD
, CAD
, EUR
, SGD
, INR
, JPY
, VND
, CNY
, KRW
, RUB
, TRY
, NGN
, ARS
, AUD
, CHF
, and GBP
.
If true
, NFTs will be included in the response.
If true
, only NFTs that have been cached will be included in the response. Helpful for faster response times.
If true
, the suspected spam tokens are removed. Supports eth-mainnet
and matic-mainnet
.
If true
, the response shape is limited to a list of collections and token ids, omitting metadata and asset information. Helpful for faster response times and wallets holding a large number of NFTs.
Response
The requested address.
The requested chain ID eg: 1
.
The requested chain name eg: eth-mainnet
.
The requested quote currency eg: USD
.
The timestamp when the response was generated. Useful to show data staleness to users.
List of response items.
Use contract decimals to format the token balance for display purposes - divide the balance by 10^{contract_decimals}
.
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.
A display-friendly name for the contract.
A list of supported standard ERC interfaces, eg: ERC20
and ERC721
.
The contract logo URL.
The timestamp when the token was transferred.
Indicates if a token is the chain's native gas token, eg: ETH on Ethereum.
One of cryptocurrency
, stablecoin
, nft
or dust
.
Denotes whether the token is suspected spam.
b;The asset balance. Use contract_decimals
to scale this balance for display purposes.
b;The 24h asset balance. Use contract_decimals
to scale this balance for display purposes.
The exchange rate for the requested quote currency.
The 24h exchange rate for the requested quote currency.
The current balance converted to fiat in quote-currency
.
The 24h balance converted to fiat in quote-currency
.
A prettier version of the quote for rendering purposes.
A prettier version of the 24h quote for rendering purposes.
The protocol metadata.
The name of the protocol.
NFT-specific data.
b;The token's id.
b;The count of the number of NFTs with this ID.
External URL for additional metadata.
A list of supported standard ERC interfaces, eg: ERC20
and ERC721
.
b;The latest price value on chain of the token ID.
The latest quote_rate of the token ID denominated in unscaled ETH.
The address of the original owner 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.
The current owner of this NFT.
The address of the current owner of this NFT.
When set to true, this NFT has been Burned.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.BalanceService.getTokenBalancesForWalletAddress({chainName: "chainName", walletAddress: "walletAddress"});
console.log(resp.data);
};
ApiServices();
{
"address": "<string>",
"chain_id": 123,
"chain_name": "<string>",
"quote_currency": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"contract_display_name": "<string>",
"supports_erc": [
"<string>"
],
"logo_url": "<string>",
"logo_urls": {
"token_logo_url": "<string>",
"protocol_logo_url": "<string>",
"chain_logo_url": "<string>"
},
"last_transferred_at": "2023-11-07T05:31:56Z",
"native_token": true,
"type": "<string>",
"is_spam": true,
"balance": "<string>",
"balance_24h": "<string>",
"quote_rate": 123,
"quote_rate_24h": 123,
"quote": 123,
"quote_24h": 123,
"pretty_quote": "<string>",
"pretty_quote_24h": "<string>",
"protocol_metadata": {
"protocol_name": "<string>"
},
"nft_data": [
{
"token_id": "<string>",
"token_balance": "<string>",
"token_url": "<string>",
"supports_erc": [
"<string>"
],
"token_price_wei": "<string>",
"token_quote_rate_eth": "<string>",
"original_owner": "<string>",
"external_data": {
"name": "<string>",
"description": "<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>"
},
"owner": "<string>"
},
"owner": "<string>",
"owner_address": "<string>",
"burned": true
}
]
}
]
}