Datums by hashes
curl --request POST \
--url https://mainnet.gomaestro-api.org/v1/datums \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
[
"f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6",
"5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23"
]
'import requests
url = "https://mainnet.gomaestro-api.org/v1/datums"
payload = ["f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6", "5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23"]
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
'f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6',
'5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23'
])
};
fetch('https://mainnet.gomaestro-api.org/v1/datums', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6',
'5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mainnet.gomaestro-api.org/v1/datums"
payload := strings.NewReader("[\n \"f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6\",\n \"5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23\"\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mainnet.gomaestro-api.org/v1/datums")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n \"f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6\",\n \"5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.gomaestro-api.org/v1/datums")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n \"f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6\",\n \"5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23\"\n]"
response = http.request(request)
puts response.read_body{
"data": {
"5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23": {
"json": {
"fields": [
{
"bytes": "e1d915c10c840017bd39088a82507b27150a438e8907784221491309"
},
{
"bytes": "e1d915c10c840017bd39088a82507b27150a438e8907784221491309"
}
]
},
"bytes": "d8799f581ce1d915c10c840017bd3908...1a009896801a9a7ec8001b00000183c392c9a1ff"
},
"f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6": {
"json": {
"fields": [
{
"fields": [
{
"fields": [
{
"bytes": "fc6e1b47816bc4a4165a39f3c6dd65868e6b74a743dc2dcf54eb2d4c"
}
]
},
{
"fields": [
{
"fields": [
{
"fields": [
{
"bytes": "d756fb7ceee90ed5af3f193d73f9970ca640ab540eedac272cb28c29"
}
]
}
]
}
]
}
]
}
]
},
"bytes": "d8799fd8799fd8799f581cfc6e1b47816bc...d8799fd8799f581cd756fb7ceee90ed5af3f193d73f9970ca640ab540eedac272cb28c29ffffffffd8799fd8799f581cfc6e1b47816bc4a4165a39f3c6dd65868e6b74a743dc2dcf54eb2d4cffd8799fd8799fd8799f581cd756fb7ceee90ed5af3f193d73f9970ca640ab540eedac272cb28c29ffffffffd87a80d87a9fd8799f581c25f0fc240e91bd95dcdaebd2ba7713fc5168ac77234a3d79449fc20c47534f4349455459ff1a0bebc200ff1a001e84801a001e8480ff"
}
},
"last_updated": {
"timestamp": "2023-10-18 07:30:52",
"block_hash": "0e1e924710135acfe200ab13d290bd282a67584fd54456f0dcac0aeaa38bb2c2",
"block_slot": 106047961
}
}Datums
Datums by hashes
Get multiple Cardano datums by their hashes in a single request with CBOR and JSON representations for smart contracts.
POST
/
datums
Datums by hashes
curl --request POST \
--url https://mainnet.gomaestro-api.org/v1/datums \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
[
"f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6",
"5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23"
]
'import requests
url = "https://mainnet.gomaestro-api.org/v1/datums"
payload = ["f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6", "5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23"]
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
'f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6',
'5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23'
])
};
fetch('https://mainnet.gomaestro-api.org/v1/datums', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6',
'5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mainnet.gomaestro-api.org/v1/datums"
payload := strings.NewReader("[\n \"f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6\",\n \"5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23\"\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mainnet.gomaestro-api.org/v1/datums")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n \"f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6\",\n \"5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.gomaestro-api.org/v1/datums")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n \"f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6\",\n \"5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23\"\n]"
response = http.request(request)
puts response.read_body{
"data": {
"5f7f360208c46d739296ea3ff4f41d85240d94aa3f59e5b1c82c2bbeceb57f23": {
"json": {
"fields": [
{
"bytes": "e1d915c10c840017bd39088a82507b27150a438e8907784221491309"
},
{
"bytes": "e1d915c10c840017bd39088a82507b27150a438e8907784221491309"
}
]
},
"bytes": "d8799f581ce1d915c10c840017bd3908...1a009896801a9a7ec8001b00000183c392c9a1ff"
},
"f03819a4039003a8c6b65153351adbc61f983bd22787ed238a5b4f24a01aa5d6": {
"json": {
"fields": [
{
"fields": [
{
"fields": [
{
"bytes": "fc6e1b47816bc4a4165a39f3c6dd65868e6b74a743dc2dcf54eb2d4c"
}
]
},
{
"fields": [
{
"fields": [
{
"fields": [
{
"bytes": "d756fb7ceee90ed5af3f193d73f9970ca640ab540eedac272cb28c29"
}
]
}
]
}
]
}
]
}
]
},
"bytes": "d8799fd8799fd8799f581cfc6e1b47816bc...d8799fd8799f581cd756fb7ceee90ed5af3f193d73f9970ca640ab540eedac272cb28c29ffffffffd8799fd8799f581cfc6e1b47816bc4a4165a39f3c6dd65868e6b74a743dc2dcf54eb2d4cffd8799fd8799fd8799f581cd756fb7ceee90ed5af3f193d73f9970ca640ab540eedac272cb28c29ffffffffd87a80d87a9fd8799f581c25f0fc240e91bd95dcdaebd2ba7713fc5168ac77234a3d79449fc20c47534f4349455459ff1a0bebc200ff1a001e84801a001e8480ff"
}
},
"last_updated": {
"timestamp": "2023-10-18 07:30:52",
"block_hash": "0e1e924710135acfe200ab13d290bd282a67584fd54456f0dcac0aeaa38bb2c2",
"block_slot": 106047961
}
}Authorizations
Project API Key
Body
application/json
Response
Map of datum hashes to datum objects
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.
Was this page helpful?
⌘I

