HistoricalInfo
curl --request GET \
--url https://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}import requests
url = "https://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}', 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://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}",
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://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}"
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://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}")
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{
"hist": {
"header": {
"version": {
"block": "<string>",
"app": "<string>"
},
"chain_id": "<string>",
"height": "<string>",
"time": "2023-11-07T05:31:56Z",
"last_block_id": {
"hash": "aSDinaTvuI8gbWludGxpZnk=",
"part_set_header": {
"total": 123,
"hash": "aSDinaTvuI8gbWludGxpZnk="
}
},
"last_commit_hash": "aSDinaTvuI8gbWludGxpZnk=",
"data_hash": "aSDinaTvuI8gbWludGxpZnk=",
"validators_hash": "aSDinaTvuI8gbWludGxpZnk=",
"next_validators_hash": "aSDinaTvuI8gbWludGxpZnk=",
"consensus_hash": "aSDinaTvuI8gbWludGxpZnk=",
"app_hash": "aSDinaTvuI8gbWludGxpZnk=",
"last_results_hash": "aSDinaTvuI8gbWludGxpZnk=",
"evidence_hash": "aSDinaTvuI8gbWludGxpZnk=",
"proposer_address": "aSDinaTvuI8gbWludGxpZnk="
},
"valset": [
{
"operator_address": "<string>",
"consensus_pubkey": {
"@type": "<string>"
},
"jailed": true,
"status": "BOND_STATUS_UNSPECIFIED",
"tokens": "<string>",
"delegator_shares": "<string>",
"description": {
"moniker": "<string>",
"identity": "<string>",
"website": "<string>",
"security_contact": "<string>",
"details": "<string>"
},
"unbonding_height": "<string>",
"unbonding_time": "2023-11-07T05:31:56Z",
"commission": {
"commission_rates": {
"rate": "<string>",
"max_rate": "<string>",
"max_change_rate": "<string>"
},
"update_time": "2023-11-07T05:31:56Z"
},
"min_self_delegation": "<string>",
"unbonding_on_hold_ref_count": "<string>",
"unbonding_ids": [
"<string>"
]
}
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}staking
HistoricalInfo
gRPC: cosmos.staking.v1beta1.Query/HistoricalInfo (reference)
HistoricalInfo queries the historical info for given height.
GET
/
cosmos
/
staking
/
v1beta1
/
historical_info
/
{height}
HistoricalInfo
curl --request GET \
--url https://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}import requests
url = "https://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}', 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://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}",
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://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}"
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://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cosmos-rest.publicnode.com/cosmos/staking/v1beta1/historical_info/{height}")
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{
"hist": {
"header": {
"version": {
"block": "<string>",
"app": "<string>"
},
"chain_id": "<string>",
"height": "<string>",
"time": "2023-11-07T05:31:56Z",
"last_block_id": {
"hash": "aSDinaTvuI8gbWludGxpZnk=",
"part_set_header": {
"total": 123,
"hash": "aSDinaTvuI8gbWludGxpZnk="
}
},
"last_commit_hash": "aSDinaTvuI8gbWludGxpZnk=",
"data_hash": "aSDinaTvuI8gbWludGxpZnk=",
"validators_hash": "aSDinaTvuI8gbWludGxpZnk=",
"next_validators_hash": "aSDinaTvuI8gbWludGxpZnk=",
"consensus_hash": "aSDinaTvuI8gbWludGxpZnk=",
"app_hash": "aSDinaTvuI8gbWludGxpZnk=",
"last_results_hash": "aSDinaTvuI8gbWludGxpZnk=",
"evidence_hash": "aSDinaTvuI8gbWludGxpZnk=",
"proposer_address": "aSDinaTvuI8gbWludGxpZnk="
},
"valset": [
{
"operator_address": "<string>",
"consensus_pubkey": {
"@type": "<string>"
},
"jailed": true,
"status": "BOND_STATUS_UNSPECIFIED",
"tokens": "<string>",
"delegator_shares": "<string>",
"description": {
"moniker": "<string>",
"identity": "<string>",
"website": "<string>",
"security_contact": "<string>",
"details": "<string>"
},
"unbonding_height": "<string>",
"unbonding_time": "2023-11-07T05:31:56Z",
"commission": {
"commission_rates": {
"rate": "<string>",
"max_rate": "<string>",
"max_change_rate": "<string>"
},
"update_time": "2023-11-07T05:31:56Z"
},
"min_self_delegation": "<string>",
"unbonding_on_hold_ref_count": "<string>",
"unbonding_ids": [
"<string>"
]
}
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Path Parameters
height defines at which height to query the historical info.
Response
A successful response.
QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC method.
hist defines the historical info at the given height.
Show child attributes
Show child attributes
Was this page helpful?