Skip to main content
GET
/
datums
/
{datum_hash}
Datum by datum hash
curl --request GET \
  --url https://mainnet.gomaestro-api.org/v1/datums/{datum_hash} \
  --header 'api-key: <api-key>'
import requests

url = "https://mainnet.gomaestro-api.org/v1/datums/{datum_hash}"

headers = {"api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'api-key': '<api-key>'}};

fetch('https://mainnet.gomaestro-api.org/v1/datums/{datum_hash}', 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://mainnet.gomaestro-api.org/v1/datums/{datum_hash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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://mainnet.gomaestro-api.org/v1/datums/{datum_hash}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("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://mainnet.gomaestro-api.org/v1/datums/{datum_hash}")
.header("api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://mainnet.gomaestro-api.org/v1/datums/{datum_hash}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "data": {
    "json": {
      "fields": [
        {
          "bytes": "76140b3e82b58a9439ce10473d0d7c40ec9165fb03662c499a9162f95b9ec34641adbb83203c5276eaa35fc95c3776e00779ca412777cdc5201b53184d365306"
        },
        {
          "fields": [
            {
              "fields": [
                {
                  "int": 100000
                },
                {
                  "int": 36069
                }
              ]
            },
            {
              "fields": [
                {
                  "fields": [
                    {
                      "constructor": 1,
                      "fields": [
                        {
                          "int": 1676063825000
                        }
                      ]
                    },
                    {
                      "constructor": 1,
                      "fields": []
                    }
                  ]
                },
                {
                  "fields": [
                    {
                      "constructor": 1,
                      "fields": [
                        {
                          "int": 1676065625000
                        }
                      ]
                    },
                    {
                      "constructor": 1,
                      "fields": []
                    }
                  ]
                }
              ]
            },
            {
              "bytes": "555344"
            }
          ]
        },
        {
          "bytes": "0c64d6d0371d11185aae649cf3a169040e94214137137b531ebb16c2"
        }
      ]
    },
    "bytes": "d8799f584076140b3e82b58a9439ce10473d0d7c40ec9165fb03662c499a9162f95b9ec34641adbb83203c5276eaa35fc95c3776e00779ca412777cdc5201b53184d365306d8799fd8799f1a000186a0198ce5ffd8799fd8799fd87a9f1b000001863d305c68ffd87a80ffd8799fd87a9f1b000001863d4bd3a8ffd87a80ffff43555344ff581c0c64d6d0371d11185aae649cf3a169040e94214137137b531ebb16c2ff"
  },
  "last_updated": {
    "timestamp": "2022-10-10 20:25:28",
    "block_hash": "391e8974a46a05addd54593722380fdea42f29d7de4acc5729a6ec0663955293",
    "block_slot": 32284048
  }
}

Authorizations

api-key
string
header
required

Project API Key

Path Parameters

datum_hash
string
required

Hex encoded datum hash

Response

Datum corresponding to the datum hash

Timestamped response. Returns the endpoint response data along with the chain-tip of the indexer, which details at which point in the chain's history the data was correct as-of.

data
object
required
last_updated
object
required

Details of the most recent block processed by the indexer (aka chain tip); that is, the data returned is correct as of this block in time.