Get DAT Holdings Time Series
curl --request GET \
--url https://api.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{granularity} \
--header 'X-Messari-API-Key: <api-key>'import requests
url = "https://api.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{granularity}"
headers = {"X-Messari-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Messari-API-Key': '<api-key>'}};
fetch('https://api.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{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.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{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-Messari-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.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{granularity}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Messari-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.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{granularity}")
.header("X-Messari-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{granularity}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Messari-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": null,
"data": [
{
"holding": {
"id": "MSTR_btc",
"name": "Strategy BTC",
"companyTicker": "MSTR",
"assetSymbol": "btc",
"networkSlug": "bitcoin"
},
"points": [
[
1787011200,
840447,
54171331002.35294,
0
],
[
1787097600,
840447,
54347026149.71165,
0
],
[
1787184000,
840447,
58342517955.511665,
0
],
[
1787270400,
840447,
61434612466.19795,
0
]
]
}
],
"metadata": {
"pointSchemas": [
{
"name": "Timestamp",
"slug": "time",
"description": "Timestamp of the data point.",
"is_timestamp": true
},
{
"name": "AUM (Native)",
"slug": "aumNative",
"description": "Company's holdings of this asset in native units.",
"is_timestamp": false
},
{
"name": "AUM (USD)",
"slug": "aumUsd",
"description": "Company's holdings of this asset in USD.",
"is_timestamp": false
},
{
"name": "Purchases (Native)",
"slug": "purchasesNative",
"description": "Units of this asset purchased that day.",
"is_timestamp": false
}
],
"granularity": "1d"
}
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}DATs
Get DAT Holdings Time Series
Returns one company’s crypto holdings history, one time series per asset it holds, tracking units held, USD value and daily purchases. A company holding three assets returns three series. Each series carries its own assetSymbol, so you do not have to parse the composite series id. Only the 1d granularity is available for this dataset.
GET
/
metrics
/
v2
/
protocols
/
dats
/
{datIdentifier}
/
metrics
/
holdings
/
time-series
/
{granularity}
Get DAT Holdings Time Series
curl --request GET \
--url https://api.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{granularity} \
--header 'X-Messari-API-Key: <api-key>'import requests
url = "https://api.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{granularity}"
headers = {"X-Messari-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Messari-API-Key': '<api-key>'}};
fetch('https://api.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{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.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{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-Messari-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.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{granularity}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Messari-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.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{granularity}")
.header("X-Messari-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.messari.io/metrics/v2/protocols/dats/{datIdentifier}/metrics/holdings/time-series/{granularity}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Messari-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": null,
"data": [
{
"holding": {
"id": "MSTR_btc",
"name": "Strategy BTC",
"companyTicker": "MSTR",
"assetSymbol": "btc",
"networkSlug": "bitcoin"
},
"points": [
[
1787011200,
840447,
54171331002.35294,
0
],
[
1787097600,
840447,
54347026149.71165,
0
],
[
1787184000,
840447,
58342517955.511665,
0
],
[
1787270400,
840447,
61434612466.19795,
0
]
]
}
],
"metadata": {
"pointSchemas": [
{
"name": "Timestamp",
"slug": "time",
"description": "Timestamp of the data point.",
"is_timestamp": true
},
{
"name": "AUM (Native)",
"slug": "aumNative",
"description": "Company's holdings of this asset in native units.",
"is_timestamp": false
},
{
"name": "AUM (USD)",
"slug": "aumUsd",
"description": "Company's holdings of this asset in USD.",
"is_timestamp": false
},
{
"name": "Purchases (Native)",
"slug": "purchasesNative",
"description": "Units of this asset purchased that day.",
"is_timestamp": false
}
],
"granularity": "1d"
}
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}
