GoldRush SDK
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("<GOLDRUSH_API_KEY>");
const resp = await client.AllChainsService.getMultiChainBalances("demo.eth");
console.log(resp.data);
};
ApiServices();curl --request GET \
--url https://api.covalenthq.com/v1/allchains/address/{walletAddress}/balances/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.covalenthq.com/v1/allchains/address/{walletAddress}/balances/"
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/allchains/address/{walletAddress}/balances/', 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/allchains/address/{walletAddress}/balances/",
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/allchains/address/{walletAddress}/balances/"
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/allchains/address/{walletAddress}/balances/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.covalenthq.com/v1/allchains/address/{walletAddress}/balances/")
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{
"updated_at": "2023-11-07T05:31:56Z",
"cursor_before": "<string>",
"quote_currency": "<string>",
"items": [
{
"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>",
"chain_id": 123,
"chain_name": "<string>",
"chain_display_name": "<string>"
}
]
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "Chain nosuchchain-mainnet not supported.",
"error_code": 501
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "Too many concurrent database requests",
"error_code": 556
}Cross Chain
Multichain Wallet Balance API
Fetch paginated spot & historical native and token balances for a single address on up to 10 EVM chains with one API call.
GET
/
v1
/
allchains
/
address
/
{walletAddress}
/
balances
/
GoldRush SDK
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("<GOLDRUSH_API_KEY>");
const resp = await client.AllChainsService.getMultiChainBalances("demo.eth");
console.log(resp.data);
};
ApiServices();curl --request GET \
--url https://api.covalenthq.com/v1/allchains/address/{walletAddress}/balances/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.covalenthq.com/v1/allchains/address/{walletAddress}/balances/"
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/allchains/address/{walletAddress}/balances/', 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/allchains/address/{walletAddress}/balances/",
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/allchains/address/{walletAddress}/balances/"
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/allchains/address/{walletAddress}/balances/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.covalenthq.com/v1/allchains/address/{walletAddress}/balances/")
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{
"updated_at": "2023-11-07T05:31:56Z",
"cursor_before": "<string>",
"quote_currency": "<string>",
"items": [
{
"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>",
"chain_id": 123,
"chain_name": "<string>",
"chain_display_name": "<string>"
}
]
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "Chain nosuchchain-mainnet not supported.",
"error_code": 501
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "<string>",
"error_code": 123
}{
"data": null,
"error": true,
"error_message": "Too many concurrent database requests",
"error_code": 556
}Credit Cost
2.5 per call
Processing
Realtime
Estimate your monthly cost for this API using the Pricing Calculator.
Base cost is
2.5 credits (including requests that return with status 200 but no items) for the first page.Subsequent pages cost 1 credit.All EVM chains are supported. When no chains are specified, the Foundational Chains are passed as default.Domain names (e.g. demo.eth) are not supported.The UNIX cutoff-timestamp retrieves the token balance snapshot from the nearest block before the specified timestamp.Balances presented in descending order of the fiat quote value for most major tokens. Minor tokens may be presented in descending order of their last_transferred_at timestamp.Rebasing tokens (e.g. stETH, aTokens, cTokens) are supported on Foundational Chains.Authorizations
Path Parameters
Query Parameters
Response
Successful response