Estimate batch query cost
curl --request POST \
--url https://api.herodotus.cloud/estimate-batch-query-cost \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"1": {},
"300": {},
"4801": {},
"84532": {},
"421614": {},
"11155111": {},
"11155420": {},
"STARKNET": {},
"SN_SEPOLIA": {}
}
}
'import requests
url = "https://api.herodotus.cloud/estimate-batch-query-cost"
payload = { "data": {
"1": {},
"300": {},
"4801": {},
"84532": {},
"421614": {},
"11155111": {},
"11155420": {},
"STARKNET": {},
"SN_SEPOLIA": {}
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
'1': {},
'300': {},
'4801': {},
'84532': {},
'421614': {},
'11155111': {},
'11155420': {},
STARKNET: {},
SN_SEPOLIA: {}
}
})
};
fetch('https://api.herodotus.cloud/estimate-batch-query-cost', 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.herodotus.cloud/estimate-batch-query-cost",
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([
'data' => [
'1' => [
],
'300' => [
],
'4801' => [
],
'84532' => [
],
'421614' => [
],
'11155111' => [
],
'11155420' => [
],
'STARKNET' => [
],
'SN_SEPOLIA' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.herodotus.cloud/estimate-batch-query-cost"
payload := strings.NewReader("{\n \"data\": {\n \"1\": {},\n \"300\": {},\n \"4801\": {},\n \"84532\": {},\n \"421614\": {},\n \"11155111\": {},\n \"11155420\": {},\n \"STARKNET\": {},\n \"SN_SEPOLIA\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.herodotus.cloud/estimate-batch-query-cost")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"1\": {},\n \"300\": {},\n \"4801\": {},\n \"84532\": {},\n \"421614\": {},\n \"11155111\": {},\n \"11155420\": {},\n \"STARKNET\": {},\n \"SN_SEPOLIA\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.herodotus.cloud/estimate-batch-query-cost")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"1\": {},\n \"300\": {},\n \"4801\": {},\n \"84532\": {},\n \"421614\": {},\n \"11155111\": {},\n \"11155420\": {},\n \"STARKNET\": {},\n \"SN_SEPOLIA\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"feeEstimate": "<string>"
}Basic Batch Query
Estimate batch query cost
Allows you to estimate the cost of a batch query before submitting it, the body is the same as the submit batch query body, use that endpoint for reference on how to build the body.
POST
/
estimate-batch-query-cost
Estimate batch query cost
curl --request POST \
--url https://api.herodotus.cloud/estimate-batch-query-cost \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"1": {},
"300": {},
"4801": {},
"84532": {},
"421614": {},
"11155111": {},
"11155420": {},
"STARKNET": {},
"SN_SEPOLIA": {}
}
}
'import requests
url = "https://api.herodotus.cloud/estimate-batch-query-cost"
payload = { "data": {
"1": {},
"300": {},
"4801": {},
"84532": {},
"421614": {},
"11155111": {},
"11155420": {},
"STARKNET": {},
"SN_SEPOLIA": {}
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
'1': {},
'300': {},
'4801': {},
'84532': {},
'421614': {},
'11155111': {},
'11155420': {},
STARKNET: {},
SN_SEPOLIA: {}
}
})
};
fetch('https://api.herodotus.cloud/estimate-batch-query-cost', 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.herodotus.cloud/estimate-batch-query-cost",
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([
'data' => [
'1' => [
],
'300' => [
],
'4801' => [
],
'84532' => [
],
'421614' => [
],
'11155111' => [
],
'11155420' => [
],
'STARKNET' => [
],
'SN_SEPOLIA' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.herodotus.cloud/estimate-batch-query-cost"
payload := strings.NewReader("{\n \"data\": {\n \"1\": {},\n \"300\": {},\n \"4801\": {},\n \"84532\": {},\n \"421614\": {},\n \"11155111\": {},\n \"11155420\": {},\n \"STARKNET\": {},\n \"SN_SEPOLIA\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.herodotus.cloud/estimate-batch-query-cost")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"1\": {},\n \"300\": {},\n \"4801\": {},\n \"84532\": {},\n \"421614\": {},\n \"11155111\": {},\n \"11155420\": {},\n \"STARKNET\": {},\n \"SN_SEPOLIA\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.herodotus.cloud/estimate-batch-query-cost")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"1\": {},\n \"300\": {},\n \"4801\": {},\n \"84532\": {},\n \"421614\": {},\n \"11155111\": {},\n \"11155420\": {},\n \"STARKNET\": {},\n \"SN_SEPOLIA\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"feeEstimate": "<string>"
}Was this page helpful?
⌘I

