bor_getRootHash
curl --request POST \
--url https://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "bor_getRootHash",
"id": 1,
"params": [
90253627,
90253643
]
}
'import requests
url = "https://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload = {
"jsonrpc": "2.0",
"method": "bor_getRootHash",
"id": 1,
"params": [90253627, 90253643]
}
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({jsonrpc: '2.0', method: 'bor_getRootHash', id: 1, params: [90253627, 90253643]})
};
fetch('https://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e', 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://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e",
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([
'jsonrpc' => '2.0',
'method' => 'bor_getRootHash',
'id' => 1,
'params' => [
90253627,
90253643
]
]),
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://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"method\": \"bor_getRootHash\",\n \"id\": 1,\n \"params\": [\n 90253627,\n 90253643\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://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"method\": \"bor_getRootHash\",\n \"id\": 1,\n \"params\": [\n 90253627,\n 90253643\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e")
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 \"jsonrpc\": \"2.0\",\n \"method\": \"bor_getRootHash\",\n \"id\": 1,\n \"params\": [\n 90253627,\n 90253643\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}Polygon node API
bor_getRootHash | Polygon
Polygon API method bor_getRootHash returns the root hash for a given block range, used for checkpointing to Ethereum. On Polygon via Chainstack.
POST
/
mt_c524ad9781ae5dccd9ac6f5b0370e
bor_getRootHash
curl --request POST \
--url https://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "bor_getRootHash",
"id": 1,
"params": [
90253627,
90253643
]
}
'import requests
url = "https://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload = {
"jsonrpc": "2.0",
"method": "bor_getRootHash",
"id": 1,
"params": [90253627, 90253643]
}
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({jsonrpc: '2.0', method: 'bor_getRootHash', id: 1, params: [90253627, 90253643]})
};
fetch('https://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e', 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://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e",
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([
'jsonrpc' => '2.0',
'method' => 'bor_getRootHash',
'id' => 1,
'params' => [
90253627,
90253643
]
]),
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://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"method\": \"bor_getRootHash\",\n \"id\": 1,\n \"params\": [\n 90253627,\n 90253643\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://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"method\": \"bor_getRootHash\",\n \"id\": 1,\n \"params\": [\n 90253627,\n 90253643\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://polygon-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e")
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 \"jsonrpc\": \"2.0\",\n \"method\": \"bor_getRootHash\",\n \"id\": 1,\n \"params\": [\n 90253627,\n 90253643\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}Polygon API method
bor_getRootHash returns the root hash computed over a given block range. Bor uses these range root hashes when checkpointing Polygon state to Ethereum.
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
from— the start block number (integer).to— the end block number (integer). The range is capped by the node’s configured limit.
Response
result— the root hash for the requested block range, as a hexadecimal string without the0xprefix.
{ "jsonrpc": "2.0", "id": 1, "result": "684c2efeba6e8b27d1fd5082424107a53dfc16f54731908ba96c0c76c598b46a" }
Use case
bor_getRootHash is used by checkpoint and bridge tooling to reconstruct or verify the block-range root hashes that Bor submits to Ethereum.Last modified on November 6, 2026
Was this page helpful?