Get one block
Blocks
Get one block
Get the details of an individual block.
GET
Get one block
Path Parameters
Block height or latest to get latest block.
Response
200 - application/json
OK
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
curl --request GET \
--url https://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}import requests
url = "https://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}', 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://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"base_fee_per_gas": "<string>",
"difficulty": "<string>",
"extra_data": "<string>",
"gas_limit": "<string>",
"gas_used": "<string>",
"hash": "<string>",
"logs_bloom": "<string>",
"miner": "<string>",
"nonce": "<string>",
"number": 123,
"parent_hash": "<string>",
"receipt_root": "<string>",
"sha3_uncles": "<string>",
"size": 123,
"state_root": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"total_difficulty": "<string>",
"transaction_count": 123,
"transactions_root": "<string>",
"withdrawals_root": "<string>"
}Get the details of an individual block.
curl --request GET \
--url https://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}import requests
url = "https://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}', 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://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.cloud.ormi.dev/somnia/v1/block/{blockHeight}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"base_fee_per_gas": "<string>",
"difficulty": "<string>",
"extra_data": "<string>",
"gas_limit": "<string>",
"gas_used": "<string>",
"hash": "<string>",
"logs_bloom": "<string>",
"miner": "<string>",
"nonce": "<string>",
"number": 123,
"parent_hash": "<string>",
"receipt_root": "<string>",
"sha3_uncles": "<string>",
"size": 123,
"state_root": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"total_difficulty": "<string>",
"transaction_count": 123,
"transactions_root": "<string>",
"withdrawals_root": "<string>"
}Block height or latest to get latest block.
OK