Blocks Metrics Historical
curl --request GET \
--url https://api.amberdata.com/blockchains/blocks/metrics/historical \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/blockchains/blocks/metrics/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/blocks/metrics/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/blocks/metrics/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/blocks/metrics/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/blocks/metrics/historical")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/blockchains/blocks/metrics/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": {
"records": [
{
"timestamp": "2021-08-10T00:00:00.000Z",
"difficultyAverage": "7699414348610995.0000",
"difficultyMaximum": "7699414348610995",
"difficultyMinimum": "7699414348610995",
"durationAverage": "41000.000000000000",
"durationMaximum": "41000",
"durationMinimum": "41000",
"hashrateAverage": 187790593868561,
"baseFeeAverage": "30258142234.00000000",
"baseFeeMaximum": "30258142234",
"baseFeeMinimum": "30258142234",
"baseFeeTotal": "30258142234",
"burntFeeAverage": "351805579933266838",
"burntFeeMaximum": "351805579933266838",
"burntFeeMinimum": "351805579933266838",
"burntFeeTotal": "351805579933266838",
"issuanceAverage": "2000000000000000000",
"issuanceMaximum": "2000000000000000000",
"issuanceMinimum": "2000000000000000000",
"issuanceTotal": "2000000000000000000",
"issuanceUnit": "wei",
"sizeAverage": "42380.000000000000",
"sizeMaximum": 42380,
"sizeMinimum": 42380,
"sizeTotal": "42380",
"transactionFeeAverage": "8191431157883818.0000",
"transactionFeeMaximum": "8191431157883818",
"transactionFeeMinimum": "8191431157883818",
"transactionFeeTotal": "8191431157883818",
"transactionsAverage": "93.0000000000000000",
"transactionsMaximum": 93,
"transactionsMinimum": 93,
"transactionsTotal": "93"
}
],
"totalRecords": 365
}
}"Unauthorized"Metrics
Blocks Metrics Historical
Get metrics for historical confirmed blocks for a given blockchain.
GET
/
blocks
/
metrics
/
historical
Blocks Metrics Historical
curl --request GET \
--url https://api.amberdata.com/blockchains/blocks/metrics/historical \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/blockchains/blocks/metrics/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/blocks/metrics/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/blocks/metrics/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/blocks/metrics/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/blocks/metrics/historical")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/blockchains/blocks/metrics/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": {
"records": [
{
"timestamp": "2021-08-10T00:00:00.000Z",
"difficultyAverage": "7699414348610995.0000",
"difficultyMaximum": "7699414348610995",
"difficultyMinimum": "7699414348610995",
"durationAverage": "41000.000000000000",
"durationMaximum": "41000",
"durationMinimum": "41000",
"hashrateAverage": 187790593868561,
"baseFeeAverage": "30258142234.00000000",
"baseFeeMaximum": "30258142234",
"baseFeeMinimum": "30258142234",
"baseFeeTotal": "30258142234",
"burntFeeAverage": "351805579933266838",
"burntFeeMaximum": "351805579933266838",
"burntFeeMinimum": "351805579933266838",
"burntFeeTotal": "351805579933266838",
"issuanceAverage": "2000000000000000000",
"issuanceMaximum": "2000000000000000000",
"issuanceMinimum": "2000000000000000000",
"issuanceTotal": "2000000000000000000",
"issuanceUnit": "wei",
"sizeAverage": "42380.000000000000",
"sizeMaximum": 42380,
"sizeMinimum": 42380,
"sizeTotal": "42380",
"transactionFeeAverage": "8191431157883818.0000",
"transactionFeeMaximum": "8191431157883818",
"transactionFeeMinimum": "8191431157883818",
"transactionFeeTotal": "8191431157883818",
"transactionsAverage": "93.0000000000000000",
"transactionsMaximum": 93,
"transactionsMinimum": 93,
"transactionsTotal": "93"
}
],
"totalRecords": 365
}
}"Unauthorized"Authorizations
Headers
The id of the blockchain
Available options:
bitcoin-mainnet, bitcoin-abc-mainnet, ethereum-mainnet, litecoin-mainnet Query Parameters
[Optional] Filter by data after this date.
[Optional] Filter by data before this date.
[Optional] Time format of the timestamps in the return payload.
[Defaults] milliseconds | ms* | iso | iso8601 | hr | human_readable
Was this page helpful?
⌘I