curl --request GET \
--url https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"address": "<string>",
"chain_id": 123,
"chain_name": "<string>",
"chain_tip_height": 123,
"chain_tip_signed_at": "2023-11-07T05:31:56Z",
"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_urls": {
"token_logo_url": "<string>",
"protocol_logo_url": "<string>",
"chain_logo_url": "<string>"
},
"last_transferred_at": "2023-11-07T05:31:56Z",
"is_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>"
}
]
}Get Bitcoin balances for HD address
Fetch balances for each active child address derived from a Bitcoin HD wallet.
curl --request GET \
--url https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.covalenthq.com/v1/btc-mainnet/address/{walletAddress}/hd_wallets/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"address": "<string>",
"chain_id": 123,
"chain_name": "<string>",
"chain_tip_height": 123,
"chain_tip_signed_at": "2023-11-07T05:31:56Z",
"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_urls": {
"token_logo_url": "<string>",
"protocol_logo_url": "<string>",
"chain_logo_url": "<string>"
},
"last_transferred_at": "2023-11-07T05:31:56Z",
"is_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>"
}
]
}Credit Cost
Processing
Authorizations
Bearer authentication header of the form: Bearer <token>, where <token> is your GoldRush API Key.
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
Successful 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 latest block height of the blockchain at the time this response was provided.
The timestamp of the latest signed block at the time this response was provided.
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.
Show child attributes
Show child attributes