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 Bitcoin balances for HD address
Fetch balances for each active child address derived from a Bitcoin HD wallet.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.BalanceService.getBitcoinHdWalletBalances({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": [
{
"child_address": "<string>",
"address_path": "<string>",
"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": "<string>"
}
]
}
Processing: Realtime
Requests that return status 200 and no data cost 0.1 credits.
Path Parameters
The extended public key (xPub/yPub/zPub) of the HD wallet.
Query Parameters
The currency to convert the balance to. Supports USD
, CAD
, EUR
, etc.
Response
The extended public key (xPub/yPub/zPub) or HD wallet address.
The requested chain ID eg: 20090103
.
The requested chain name eg: btc-mainnet
.
The requested quote currency eg: USD
.
The timestamp when the response was generated. Useful to show data staleness to users.
List of HD wallet balance items, each containing derived addresses and balances.
The specific Bitcoin address derived from the HD wallet.
Derivation path used to derive the specific Bitcoin address, e.g., M/0H/0/0
.
Use contract decimals to format the token balance for display purposes - divide the balance by 10^{contract_decimals}
.
The name of the token, e.g., Bitcoin
.
The ticker symbol for the token, e.g., BTC
.
Address placeholder for native tokens like BTC.
A display-friendly name for the token, e.g., Bitcoin
.
Typically null for Bitcoin, but left for compatibility.
The contract logo URL.
The timestamp when the token was last transferred.
Indicates if a token is the chain's native gas token, eg: BTC on Bitcoin.
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.
NA for bitcoin.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.BalanceService.getBitcoinHdWalletBalances({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": [
{
"child_address": "<string>",
"address_path": "<string>",
"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": "<string>"
}
]
}