curl --request GET \
--url https://api.blockworks.com/query/timeseries/blockchains/{granularity} \
--header 'X-Blockworks-API-Key: <api-key>'import requests
url = "https://api.blockworks.com/query/timeseries/blockchains/{granularity}"
headers = {"X-Blockworks-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Blockworks-API-Key': '<api-key>'}};
fetch('https://api.blockworks.com/query/timeseries/blockchains/{granularity}', 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.blockworks.com/query/timeseries/blockchains/{granularity}",
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-Blockworks-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.blockworks.com/query/timeseries/blockchains/{granularity}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Blockworks-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.blockworks.com/query/timeseries/blockchains/{granularity}")
.header("X-Blockworks-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockworks.com/query/timeseries/blockchains/{granularity}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Blockworks-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"point_schema": [
{
"description": "<string>",
"field": "<string>",
"name": "<string>",
"time": true,
"type": "<string>",
"unit": "usd"
}
],
"series": [
{
"entity": {
"name": "<string>",
"slug": "<string>"
},
"key": "<string>",
"points": [
[
123
]
]
}
]
},
"error": "<string>"
}{
"data": null,
"error": "too many series requested: 11 exceeds the maximum of 10"
}{
"data": null,
"error": "this model requires authentication"
}{
"data": null,
"error": "this model requires the \"blockchains_unified\" permission"
}{
"data": null,
"error": "the all-series endpoint is not available for model \"blockchains\"; request specific series via ?series or a series-key path"
}Batch Get Blockchain timeseries
Onchain metrics for a network: transactions, addresses, contract activity, fees, revenue, DEX and perp volume, TVL, stablecoin supply and flows, bridge flows, staking, real-world assets and developer activity. Each series is one network, keyed by its network id. Coverage differs by network, so pass selections for the metrics you need.
curl --request GET \
--url https://api.blockworks.com/query/timeseries/blockchains/{granularity} \
--header 'X-Blockworks-API-Key: <api-key>'import requests
url = "https://api.blockworks.com/query/timeseries/blockchains/{granularity}"
headers = {"X-Blockworks-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Blockworks-API-Key': '<api-key>'}};
fetch('https://api.blockworks.com/query/timeseries/blockchains/{granularity}', 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.blockworks.com/query/timeseries/blockchains/{granularity}",
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-Blockworks-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.blockworks.com/query/timeseries/blockchains/{granularity}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Blockworks-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.blockworks.com/query/timeseries/blockchains/{granularity}")
.header("X-Blockworks-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockworks.com/query/timeseries/blockchains/{granularity}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Blockworks-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"point_schema": [
{
"description": "<string>",
"field": "<string>",
"name": "<string>",
"time": true,
"type": "<string>",
"unit": "usd"
}
],
"series": [
{
"entity": {
"name": "<string>",
"slug": "<string>"
},
"key": "<string>",
"points": [
[
123
]
]
}
]
},
"error": "<string>"
}{
"data": null,
"error": "too many series requested: 11 exceeds the maximum of 10"
}{
"data": null,
"error": "this model requires authentication"
}{
"data": null,
"error": "this model requires the \"blockchains_unified\" permission"
}{
"data": null,
"error": "the all-series endpoint is not available for model \"blockchains\"; request specific series via ?series or a series-key path"
}Authorizations
API key sent in the X-Blockworks-API-Key header; x-messari-api-key is accepted for existing integrations. The catalog endpoints and models on the public access tier need no key.
Path Parameters
Data granularity.
1d, 1w Query Parameters
Comma-separated Network ID values naming the series to return (up to 10). Required: this model has too many series to return at once.
Time window, one of: to-date (ytd, qtd, mtd, dtd, htd); relative, followed by m, h, d or w (30d, 12h, 4w; 1y and 1M are not accepted, use 365d, 52w, ytd or a calendar year); a calendar day (YYYY-MM-DD), month (YYYY-MM) or year (YYYY); or an RFC3339 instant, which runs from then to now. Mutually exclusive with start/end. Default: everything retained, up to now.
Window start, inclusive (RFC3339, unix seconds, or YYYY-MM-DD). Default: unbounded.
Window end, exclusive (RFC3339, unix seconds, or YYYY-MM-DD). Default: now.
If true, return only the first and last point of the resolved time window instead of every point in it.
Comma-separated metric fields to return; defaults to every metric. A point always leads with its timestamp, and the values that follow are described by point_schema in catalog order regardless of the order requested here.
successful-transactions, unsuccessful-transactions, new-addresses, returning-addresses, active-contracts, total-contract-calls, new-contracts-called, returning-contracts-called, unique-contract-callers, dex-volume-usd, dex-volume-dominance, options-volume, bridge-deposit-volume, bridge-withdraw-volume, bridge-net-flow, bridge-deposit-transactions, bridge-withdraw-transactions, bridge-net-flow-transactions, total-blocks, min-block-number, max-block-number, block-producers, contract-call-gas-payers, new-contract-deployers, estimated-nakamoto-coefficient, gas-spenders, total-stablecoin-circulating, circulating-marketcap, total-transactions, block-time-ms, transactions-per-second, active-addresses, new-contracts-deployed, contract-deployers, fee-revenue, fee-median, rolling-7d-avg-transaction-fees, average-fee-per-transaction, fees-total-usd, fees-supply-side-usd, expenses-usd, real-economic-value-usd, token-incentives-usd, stablecoin-mints-usd, stablecoin-burns-usd, stablecoin-outstanding-supply-usd, stablecoin-transfer-volume-usd, stablecoin-transfer-count, stablecoin-transfer-avg-value-usd, stablecoin-active-addresses, stablecoin-total-addresses, stablecoin-transaction-volume-usd, stablecoin-transaction-count, stablecoin-avg-transaction-value-usd, tvl-usd, tvl-dominance, ecosystem-dex-volume-usd, ecosystem-fees-usd, code-commits, active-developers, ecosystem-code-commits, tvs-usd, avg-gas-per-second, operations-count, operations-active-addresses, trx-transaction-volume-usd, trx-transaction-volume, trx-transaction-count, trx-transfers-count, usdt-transfers-count, avg-trx-transfer-fee-usd, avg-trx-transfer-fee-native, avg-usdt-transfer-fee-usd, avg-usdt-transfer-fee-native, free-txns-count-trx-burned, free-txns-count-trx-staking, total-free-transactions-count, trx-burned-usd, trx-burned, claimed-staking-rewards-usd, claimed-staking-rewards-native, sr-staking-rewards-usd, sr-staking-rewards-native, srp-staking-rewards-usd, srp-staking-rewards-native, staking-apy, real-yield-apy, energy-utilization-rate, energy-price-justlend, energy-stake-income-native, energy-stake-income-usd, fees-paid-to-l2-usd, rent-paid-to-l1-usd, total-value-secured-usd, number-of-validators, gas-used, trading-volume-usd, borrowed-usd, borrowed-dominance, capital-deployed, pf-circulating, ps-circulating, tvl-native, rwa-tvl-usd, rwa-tokenholders, rwa-project-count, rwa-asset-market-cap-usd, rwa-capital-deployed-usd, rwa-outstanding-supply-usd, total-staked-native, total-staked-usd, staking-rate-pct, validator-count, delegator-count, liquid-staked-native, liquid-staked-usd, liquid-staking-rate-pct, native-staked-native, native-staked-usd, net-stake-flow-native, net-stake-flow-usd, staking-apr-30d-pct, staking-apy-30d-pct, real-staking-apy-30d-pct, staking-inflation-rate-30d-pct, staking-rewards-native, staking-rewards-usd, active-validator-count, staker-count, avg-validator-commission-rate, stake-weighted-commission-rate, spot-dex-trade-count, perp-dex-volume-usd, perp-dex-open-interest-usd, perp-dex-trade-count, perp-dex-fees-usd, perp-dex-revenue-usd, lending-tvl-usd, app-revenue-usd, stablecoin-count, stablecoin-usd-pegged-supply-usd, stablecoin-non-usd-pegged-supply-usd, stablecoin-balance-protocol-owned-usd, stablecoin-balance-bridge-usd, stablecoin-balance-cex-usd, stablecoin-balance-perp-dex-usd, stablecoin-balance-spot-dex-usd, stablecoin-balance-lending-usd, stablecoin-balance-unknown-usd, stablecoin-bwr-mints-usd, stablecoin-bwr-burns-usd, stablecoin-holders, stablecoin-transfer-senders, stablecoin-transfer-receivers Response format, overriding the Accept header: json (default), csv, or jsonl (NDJSON). csv and jsonl return the rows as a downloadable file.
json, csv, jsonl