Skip to main content
GET
/
validators
validators
curl --request GET \
  --url https://rpc.cosmos.directory/cosmoshub/validators
import requests

url = "https://rpc.cosmos.directory/cosmoshub/validators"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://rpc.cosmos.directory/cosmoshub/validators', 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://rpc.cosmos.directory/cosmoshub/validators",
  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://rpc.cosmos.directory/cosmoshub/validators"

	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://rpc.cosmos.directory/cosmoshub/validators")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://rpc.cosmos.directory/cosmoshub/validators")

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
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "block_height": "55",
    "validators": [
      {
        "address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
        "pub_key": {
          "type": "tendermint/PubKeyEd25519",
          "value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
        },
        "voting_power": "239727",
        "proposer_priority": "-11896414"
      }
    ],
    "count": "1",
    "total": "25"
  }
}
{
  "id": 0,
  "jsonrpc": "2.0",
  "error": "Description of failure"
}

Query Parameters

height
integer
default:0

height to return. If no height is provided, it will fetch validator set which corresponds to the latest block.

Example:

1

page
integer
default:1

Page number (1-based)

Example:

1

per_page
integer
default:30

Number of entries per page (max: 100)

Example:

30

Response

Commit results.

jsonrpc
string
required
Example:

"2.0"

id
integer
required
Example:

0

result
object
required