Token Balances Latest
curl --request GET \
--url https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/latest \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/latest"
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/latest', 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/latest",
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/latest"
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/latest")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/latest")
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",
"totalRecords": 84,
"payload": {
"totalRecords": 804219,
"records": [
{
"blockchainId": "1c9c969065fcd1cf",
"amount": "100000100000000000000000000",
"address": "0xfa6f7881e52fdf912c4a285d78a3141b089ce859",
"holder": "0xbae25a69a6eb7341ee834be7635e247e22a1e57a",
"decimals": "18",
"name": "Avocado",
"symbol": "CK",
"isERC20": false,
"isERC721": true,
"isERC777": false,
"isERC884": false,
"isERC998": false
}
]
}
}"{}"Wallet (Address) Balances
Token Balances Latest
Retrieves the tokens this address is holding.
GET
/
addresses
/
{hash}
/
token-balances
/
latest
Token Balances Latest
curl --request GET \
--url https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/latest \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/latest"
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/latest', 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/latest",
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/latest"
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/latest")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/blockchains/addresses/{hash}/token-balances/latest")
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",
"totalRecords": 84,
"payload": {
"totalRecords": 804219,
"records": [
{
"blockchainId": "1c9c969065fcd1cf",
"amount": "100000100000000000000000000",
"address": "0xfa6f7881e52fdf912c4a285d78a3141b089ce859",
"holder": "0xbae25a69a6eb7341ee834be7635e247e22a1e57a",
"decimals": "18",
"name": "Avocado",
"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, solana-mainnet Path Parameters
address to retrieve tokens for
Query Parameters
The direction by which to sort the tokens (ascending or descending).
Indicates whether or not to include price data with the results. Options: true, false. More Details.
The currency of the price information (usd or eth.) - only used in conjunction with includePrice. More Details.
The metric by which to rank the tokens (amount, name, symbol).
The page number to return.
The number of records per page.
Was this page helpful?