curl --request GET \
--url https://api.amberdata.com/blockchains/tokens/{hash}/supplies/historical \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/blockchains/tokens/{hash}/supplies/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/tokens/{hash}/supplies/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/tokens/{hash}/supplies/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/tokens/{hash}/supplies/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/tokens/{hash}/supplies/historical")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/blockchains/tokens/{hash}/supplies/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": {
"metadata": {
"columns": [
"timestamp",
"numHolders",
"circulatingSupply",
"totalSupply"
],
"startDate": 1573257600000,
"endDate": 1575849600000,
"decimals": "18"
},
"data": [
[
1573257600000,
15460,
"1000000000000000000000000",
"1000000000000000000000000"
]
]
}
}"{}"Token Supplies by Address Historical
Retrieves the historical token supplies (and derivatives) for the specified address.
Note: This endpoint returns a max of 6 months of historical data. In order to get more than 6 months you must use the startDate & endDate parameters to move the time frame window to get the next n days/months of data.
curl --request GET \
--url https://api.amberdata.com/blockchains/tokens/{hash}/supplies/historical \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/blockchains/tokens/{hash}/supplies/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/tokens/{hash}/supplies/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/tokens/{hash}/supplies/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/tokens/{hash}/supplies/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/tokens/{hash}/supplies/historical")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/blockchains/tokens/{hash}/supplies/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": {
"metadata": {
"columns": [
"timestamp",
"numHolders",
"circulatingSupply",
"totalSupply"
],
"startDate": 1573257600000,
"endDate": 1575849600000,
"decimals": "18"
},
"data": [
[
1573257600000,
15460,
"1000000000000000000000000",
"1000000000000000000000000"
]
]
}
}"{}"Authorizations
Headers
The id of the blockchain
ethereum-mainnet, polygon-mainnet Path Parameters
The address for which to retrieve token supply. (example is MKR)
Query Parameters
Filter by token prices after this date - note that the interval can not exceed 6 months (d), or 30 days (h).
Filter by token prices before this date - note that the interval can not exceed 6 months (d), or 30 days (h).
The time interval to return the historical data in: by day (days) or by hour (hours).
[Optional] Time format of the timestamps in the return payload.
[Defaults] milliseconds | ms* | iso | iso8601 | hr | human_readable
Was this page helpful?