GoldRush SDK
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("<GOLDRUSH_API_KEY>");
// Returns an async iterator that fetches one page per step.
for await (const page of client.BalanceService.getErc20TransfersForWalletAddress("eth-mainnet", "demo.eth", { contractAddress: "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984" })) {
console.log(page.data);
}
};
ApiServices();curl --request GET \
--url https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transfers_v2/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transfers_v2/"
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/{chainName}/address/{walletAddress}/transfers_v2/', 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/{chainName}/address/{walletAddress}/transfers_v2/",
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/{chainName}/address/{walletAddress}/transfers_v2/"
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/{chainName}/address/{walletAddress}/transfers_v2/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transfers_v2/")
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>",
"updated_at": "2023-11-07T05:31:56Z",
"quote_currency": "<string>",
"chain_id": 123,
"chain_name": "<string>",
"chain_tip_height": 123,
"chain_tip_signed_at": "2023-11-07T05:31:56Z",
"items": [
{
"block_signed_at": "2023-11-07T05:31:56Z",
"block_height": 123,
"block_hash": "<string>",
"tx_hash": "<string>",
"tx_offset": 123,
"successful": true,
"miner_address": "<string>",
"from_address": "<string>",
"to_address": "<string>",
"value": "<string>",
"value_quote": 123,
"pretty_value_quote": "<string>",
"gas_metadata": {
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"supports_erc": [
"<string>"
],
"logo_url": "<string>"
},
"gas_offered": 123,
"gas_spent": 123,
"gas_price": 123,
"fees_paid": "<string>",
"gas_quote": 123,
"pretty_gas_quote": "<string>",
"gas_quote_rate": 123,
"transfers": [
{
"block_signed_at": "2023-11-07T05:31:56Z",
"tx_hash": "<string>",
"from_address": "<string>",
"to_address": "<string>",
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"logo_url": "<string>",
"transfer_type": "<string>",
"delta": "<string>",
"balance": "<string>",
"quote_rate": 123,
"delta_quote": 123,
"pretty_delta_quote": "<string>",
"balance_quote": 123,
"method_calls": [
{
"sender_address": "<string>",
"method": "<string>"
}
],
"explorers": [
{
"label": "<string>",
"url": "<string>"
}
]
}
]
}
],
"pagination": {
"has_more": true,
"page_number": 123,
"page_size": 123,
"total_count": 123
}
}Balances
ERC-20 Token Transfers API
Returns the transfer-in and transfer-out of a token for an address, along with historical prices.
GET
/
v1
/
{chainName}
/
address
/
{walletAddress}
/
transfers_v2
/
GoldRush SDK
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("<GOLDRUSH_API_KEY>");
// Returns an async iterator that fetches one page per step.
for await (const page of client.BalanceService.getErc20TransfersForWalletAddress("eth-mainnet", "demo.eth", { contractAddress: "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984" })) {
console.log(page.data);
}
};
ApiServices();curl --request GET \
--url https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transfers_v2/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transfers_v2/"
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/{chainName}/address/{walletAddress}/transfers_v2/', 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/{chainName}/address/{walletAddress}/transfers_v2/",
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/{chainName}/address/{walletAddress}/transfers_v2/"
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/{chainName}/address/{walletAddress}/transfers_v2/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transfers_v2/")
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>",
"updated_at": "2023-11-07T05:31:56Z",
"quote_currency": "<string>",
"chain_id": 123,
"chain_name": "<string>",
"chain_tip_height": 123,
"chain_tip_signed_at": "2023-11-07T05:31:56Z",
"items": [
{
"block_signed_at": "2023-11-07T05:31:56Z",
"block_height": 123,
"block_hash": "<string>",
"tx_hash": "<string>",
"tx_offset": 123,
"successful": true,
"miner_address": "<string>",
"from_address": "<string>",
"to_address": "<string>",
"value": "<string>",
"value_quote": 123,
"pretty_value_quote": "<string>",
"gas_metadata": {
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"supports_erc": [
"<string>"
],
"logo_url": "<string>"
},
"gas_offered": 123,
"gas_spent": 123,
"gas_price": 123,
"fees_paid": "<string>",
"gas_quote": 123,
"pretty_gas_quote": "<string>",
"gas_quote_rate": 123,
"transfers": [
{
"block_signed_at": "2023-11-07T05:31:56Z",
"tx_hash": "<string>",
"from_address": "<string>",
"to_address": "<string>",
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"logo_url": "<string>",
"transfer_type": "<string>",
"delta": "<string>",
"balance": "<string>",
"quote_rate": 123,
"delta_quote": 123,
"pretty_delta_quote": "<string>",
"balance_quote": 123,
"method_calls": [
{
"sender_address": "<string>",
"method": "<string>"
}
],
"explorers": [
{
"label": "<string>",
"url": "<string>"
}
]
}
]
}
],
"pagination": {
"has_more": true,
"page_number": 123,
"page_size": 123,
"total_count": 123
}
}Credit Cost
0.05 per item
Processing
Realtime
Estimate your monthly cost for this API using the Pricing Calculator.
Authorizations
Path Parameters
Query Parameters
Response
200 - application/json
Successful response