wallet/getblockbyid
curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid \
--header 'Content-Type: application/json' \
--data '
{
"value": "0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca"
}
'import requests
url = "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid"
payload = { "value": "0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca" }
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({value: '0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca'})
};
fetch('https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid', 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://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid",
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([
'value' => '0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca'
]),
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://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid"
payload := strings.NewReader("{\n \"value\": \"0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca\"\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://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid")
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 \"value\": \"0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca\"\n}"
response = http.request(request)
puts response.read_body{
"blockID": "<string>",
"block_header": {
"raw_data": {
"timestamp": 123,
"txTrieRoot": "<string>",
"parentHash": "<string>",
"number": 123,
"witness_address": "<string>",
"version": 123
},
"witness_signature": "<string>"
},
"transactions": [
{}
]
}TRON node API
wallet/getblockbyid | TRON
TRON API method that retrieves a specific block from the TRON blockchain using its block ID (hash). Use it on TRON via Chainstack.
POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
getblockbyid
wallet/getblockbyid
curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid \
--header 'Content-Type: application/json' \
--data '
{
"value": "0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca"
}
'import requests
url = "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid"
payload = { "value": "0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca" }
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({value: '0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca'})
};
fetch('https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid', 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://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid",
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([
'value' => '0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca'
]),
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://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid"
payload := strings.NewReader("{\n \"value\": \"0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca\"\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://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid")
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 \"value\": \"0000000000f4245300b88ffeb9bdb95b88c66b5ce6bb0ee79d85d5ce14b6a2a7ca\"\n}"
response = http.request(request)
puts response.read_body{
"blockID": "<string>",
"block_header": {
"raw_data": {
"timestamp": 123,
"txTrieRoot": "<string>",
"parentHash": "<string>",
"number": 123,
"witness_address": "<string>",
"version": 123
},
"witness_signature": "<string>"
},
"transactions": [
{}
]
}TRON API method that retrieves a specific block from the TRON blockchain using its block ID (hash). This method allows you to fetch detailed information about a particular block, including its header, transactions, and metadata.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
value— the block ID (hash) in hexadecimal format to retrieve
Response
blockID— the block hash identifierblock_header— block header information containing:raw_data— raw block header data including:timestamp— block generation timestamp in millisecondstxTrieRoot— transaction trie root hashparentHash— parent block hashnumber— block height/numberwitness_address— address of the block producer (witness)version— block version
witness_signature— digital signature of the block producer
transactions— array of all transactions included in the block
Use case
Thewallet/getblockbyid method is used for:
- Retrieving detailed information about a specific block using its hash.
- Building block explorers that need to display block details by ID.
- Verifying block contents and validating transactions within a specific block.
- Analyzing historical blockchain data for auditing and compliance purposes.
- Implementing blockchain synchronization tools that need to fetch blocks by their identifiers.
Last modified on June 22, 2026
Was this page helpful?