Skip to main content

platform.getValidatorsAt RPC Method

Get the validators and their weights of a subnet or the Primary Network at a given P-Chain height.

Updated on
Nov 2, 2023

platform.getValidatorsAt RPC Method

Parameters

height
int
the numerical value representing the P-Chain height to get the validator set at.
subnetID
string
the subnet ID to get the validator set of. If not given, gets validator set of the PrimaryNetwork.

Returns

validators
object
the validatorsand their weights of a subnet or the Primary Network.
Request
1
curl --location --request POST https://docs-demo.avalanche-mainnet.quiknode.pro/ext/bc/C/rpc/ext/bc/P \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"jsonrpc":"2.0",
5
"id" :1,
6
"method" :"platform.getValidatorsAt",
7
"params" :{
8
"height": 1,
9
"subnetID":"11111111111111111111111111111111LpoYY"
10
}
11
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free