platform.getCurrentValidators
List the current validators of the given Subnet.
This method will use 10 Compute Units.
Reference: Here
Parameters
subnetID- string - (optional) The subnet whose current validators are returned. If omitted, returns the current validators of the Primary NetworknodeIDs- string - (optional) A list of the nodeIDs of pending validators to request. If omitted, all pending validators are returned. If a specified nodeID is not in the set of pending validators, it will not be included in the response
Returns
subnetIDis the Subnet whose current validators are returned. If omitted, returns the current validators of the Primary Network.nodeIDsis a list of the NodeIDs of current validators to request. If omitted, all current validators are returned. If a specified NodeID is not in the set of current validators, it will not be included in the response.validators:txIDis the validator transaction.startTimeis the Unix time when the validator starts validating the Subnet.endTimeis the Unix time when the validator stops validating the Subnet.stakeAmountis the amount of tokens this validator staked. Omitted ifsubnetIDis not a PoS Subnet.nodeIDis the validator’s node ID.weightis the validator’s weight when sampling validators. Omitted ifsubnetIDis a PoS Subnet.validationRewardOwneris anOutputOwnersoutput which includeslocktime,thresholdand array ofaddresses. Specifies the owner of the potential reward earned from staking. Omitted ifsubnetIDis not a PoS Subnet.delegationRewardOwneris anOutputOwnersoutput which includeslocktime,thresholdand array ofaddresses. Specifies the owner of the potential reward earned from delegations. Omitted ifsubnetIDis not a PoS Subnet.potentialRewardis the potential reward earned from staking. Omitted ifsubnetIDis not a PoS Subnet.delegationFeeRateis the percent fee this validator charges when others delegate stake to them. Omitted ifsubnetIDis not a PoS Subnet.uptimeis the % of time the queried node has reported the peer as online and validating the Subnet.connectedis if the node is connected and tracks the Subnet.signeris the node's BLS public key and proof of possession. Omitted if the validator doesn't have a BLS public key.delegatorCountis the number of delegators on this validator. Omitted ifsubnetIDis not a PoS Subnet.delegatorWeightis total weight of delegators on this validator. Omitted ifsubnetIDis not a PoS Subnet.delegatorsis the list of delegators to this validator. Omitted ifsubnetIDis not a PoS Subnet. Omitted unlessnodeIDsspecifies a single NodeID.txIDis the delegator transaction.startTimeis the Unix time when the delegator started.endTimeis the Unix time when the delegator stops.stakeAmountis the amount of nAVAX this delegator staked.nodeIDis the validating node’s node ID.rewardOwneris anOutputOwnersoutput which includeslocktime,thresholdand array ofaddresses.potentialRewardis the potential reward earned from staking
// Result
{
"jsonrpc": "2.0",
"result": {
"validators": [
{
"txID": "2NNkpYTGfTFLSGXJcHtVv6drwVU2cczhmjK2uhvwDyxwsjzZMm",
"startTime": "1600368632",
"endTime": "1602960455",
"stakeAmount": "2000000000000",
"nodeID": "NodeID-5mb46qkSBj81k9g9e4VFjGGSbaaSLFRzD",
"validationRewardOwner": {
"locktime": "0",
"threshold": "1",
"addresses": ["P-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5"]
},
"delegationRewardOwner": {
"locktime": "0",
"threshold": "1",
"addresses": ["P-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5"]
},
"potentialReward": "117431493426",
"delegationFee": "10.0000",
"uptime": "0.0000",
"connected": false,
"delegatorCount": "1",
"delegatorWeight": "25000000000",
"delegators": [
{
"txID": "Bbai8nzGVcyn2VmeYcbS74zfjJLjDacGNVuzuvAQkHn1uWfoV",
"startTime": "1600368523",
"endTime": "1602960342",
"stakeAmount": "25000000000",
"nodeID": "NodeID-5mb46qkSBj81k9g9e4VFjGGSbaaSLFRzD",
"rewardOwner": {
"locktime": "0",
"threshold": "1",
"addresses": ["P-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5"]
},
"potentialReward": "11743144774"
}
]
}
]
},
"id": 1
}curl https://mainnet.avalanche.validationcloud.io/v1/<YOUR_API_KEY_HERE>/ext/bc/P \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "platform.getCurrentValidators",
"params": {
"nodeIDs": ["NodeID-5mb46qkSBj81k9g9e4VFjGGSbaaSLFRzD"]
},
"id": 1
}'
curl https://fuji.avalanche.validationcloud.io/v1/<YOUR_API_KEY_HERE>/ext/bc/P \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "platform.getCurrentValidators",
"params": {
"nodeIDs": ["NodeID-5mb46qkSBj81k9g9e4VFjGGSbaaSLFRzD"]
},
"id": 1
}'Last updated
Was this helpful?