import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("<GOLDRUSH_API_KEY>");
const resp = await client.TransactionService.getTransactionSummary({chainName: "chainName", walletAddress: "walletAddress"});
console.log(resp.data);
};
ApiServices();curl --request GET \
--url https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transactions_summary/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transactions_summary/"
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}/transactions_summary/', 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}/transactions_summary/",
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}/transactions_summary/"
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}/transactions_summary/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transactions_summary/")
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",
"address": "<string>",
"chain_id": 123,
"chain_name": "<string>",
"items": [
{
"total_count": 123,
"transfer_count": 123,
"earliest_transaction": {
"block_signed_at": "2023-11-07T05:31:56Z",
"tx_hash": "<string>",
"tx_detail_link": "<string>"
},
"latest_transaction": {},
"gas_summary": {
"total_sent_count": 123,
"total_fees_paid": "<string>",
"total_gas_quote": 123,
"pretty_total_gas_quote": "<string>",
"average_gas_quote_per_tx": 123,
"pretty_average_gas_quote_per_tx": "<string>",
"gas_metadata": {
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"supports_erc": [
"<string>"
],
"logo_url": "<string>"
}
}
}
]
}Get transaction summary for address
Used to fetch the earliest and latest transactions, and the transaction count for a wallet.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("<GOLDRUSH_API_KEY>");
const resp = await client.TransactionService.getTransactionSummary({chainName: "chainName", walletAddress: "walletAddress"});
console.log(resp.data);
};
ApiServices();curl --request GET \
--url https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transactions_summary/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transactions_summary/"
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}/transactions_summary/', 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}/transactions_summary/",
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}/transactions_summary/"
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}/transactions_summary/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transactions_summary/")
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",
"address": "<string>",
"chain_id": 123,
"chain_name": "<string>",
"items": [
{
"total_count": 123,
"transfer_count": 123,
"earliest_transaction": {
"block_signed_at": "2023-11-07T05:31:56Z",
"tx_hash": "<string>",
"tx_detail_link": "<string>"
},
"latest_transaction": {},
"gas_summary": {
"total_sent_count": 123,
"total_fees_paid": "<string>",
"total_gas_quote": 123,
"pretty_total_gas_quote": "<string>",
"average_gas_quote_per_tx": 123,
"pretty_average_gas_quote_per_tx": "<string>",
"gas_metadata": {
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"supports_erc": [
"<string>"
],
"logo_url": "<string>"
}
}
}
]
}Credit Cost
Processing
- Base cost is
1credit. - Using
with-gasis an additional1credit. - Using
with-transfer-countis an additional3credits.
Related guides
Related guides
Authorizations
Bearer authentication header of the form: Bearer <token>, where <token> is your GoldRush API Key.
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.
Include gas summary details. Response times may be impacted for wallets with large number of transactions.
Represents the total count of ERC-20 token movement events, including Transfer, Deposit and Withdraw. Response times may be impacted for wallets with large number of transactions.
Response
Successful response
The timestamp when the response was generated. Useful to show data staleness to users.
The requested address.
The requested chain ID eg: 1.
The requested chain name eg: eth-mainnet.
List of response items.
Show child attributes
Show child attributes