Token Balances Historical
curl --request GET \
--url https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/historical \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/historical"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/historical', 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.amberdata.com/blockchains/addresses/{hash}/token-balances/historical",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.amberdata.com/blockchains/addresses/{hash}/token-balances/historical"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.amberdata.com/blockchains/addresses/{hash}/token-balances/historical")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/historical")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"totalRecords": 804219,
"records": [
{
"blockchainId": "1c9c969065fcd1cf",
"amount": "1341",
"address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
"holder": "0xbae25a69a6eb7341ee834be7635e247e22a1e57a",
"decimals": "0",
"name": "CryptoKitties",
"symbol": "CK",
"isERC20": false,
"isERC721": true,
"isERC777": false,
"isERC884": false,
"isERC998": false
}
]
}
}"{}"Wallet (Address) Balances
Token Balances Historical
Retrieves the historical (time series) token balances for the specified address.
GET
/
addresses
/
{hash}
/
token-balances
/
historical
Token Balances Historical
curl --request GET \
--url https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/historical \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/historical"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/historical', 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.amberdata.com/blockchains/addresses/{hash}/token-balances/historical",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.amberdata.com/blockchains/addresses/{hash}/token-balances/historical"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.amberdata.com/blockchains/addresses/{hash}/token-balances/historical")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/historical")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"totalRecords": 804219,
"records": [
{
"blockchainId": "1c9c969065fcd1cf",
"amount": "1341",
"address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
"holder": "0xbae25a69a6eb7341ee834be7635e247e22a1e57a",
"decimals": "0",
"name": "CryptoKitties",
"symbol": "CK",
"isERC20": false,
"isERC721": true,
"isERC777": false,
"isERC884": false,
"isERC998": false
}
]
}
}"{}"Authorizations
Headers
The id of the blockchain
Available options:
ethereum-mainnet, polygon-mainnet Path Parameters
The address to retrieve tokens for
Query Parameters
Filters by token balances which value is equal to this amount
Filter by token balances which value is greater than this amount
Filter by token balances which value is greater than or equal to this amount
Filter by token balances which value is less than this amount
Filter by token balances which value is less than or equal to this amount
Filter by blockNumber
Get balance after a start date (Requires endDate)
Get balances before the specified date (Requires startDate)
Filter by the specified token address.
The page number to return.
Number of records per page
Was this page helpful?