validators - TAC

Returns the validator set at a given height, paginated. Omitting height returns the latest set.

Method

validators

Parameters

ParameterTypeDescription
heightstringBlock height (omit for latest)
pagestringPage number
per_pagestringResults per page (max 100)

Example

bashexport TAC_TM=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

# JSON-RPC over HTTP (POST)
curl -X POST "${TAC_TM}" -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": "getblock.io", "method": "validators", "params": {"height": "5123456", "page": "1", "per_page": "100"}}'

# URI over HTTP (GET)
curl "${TAC_TM}validators?height=5123456&page=1&per_page=100"

Response

json{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "block_height": "5123456",
        "validators": [
            {
                "address": "8BFAB70E...",
                "voting_power": "1000000",
                "proposer_priority": "0"
            }
        ],
        "count": "1",
        "total": "100"
    }
}

Response Fields

FieldTypeDescription
block_heightstringHeight of the returned validator set
validatorsarrayValidators with address, voting power, and proposer priority
totalstringTotal validator count

Use Cases

  • Validator set: Read the active set at a height
  • Voting power: Compute stake distribution for a block

Error Handling

ErrorMessageDescription
-32600 / Invalid requestInvalid requestThe JSON-RPC envelope was malformed
-32602 / Invalid paramsInvalid paramsA parameter was missing or of the wrong type
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect