AptosAptos Network's breakthrough technology and seamless user experience are now available on QuickNode.
Start building today!The API credit value for this method is 1 . To learn more about API credits and each method's value, visit the API Credits page.
Parameters:
Returns:
txID - string - the validator transaction.
startTime - string - the Unix time when the validator starts validating the Subnet.
endTime - string - the Unix time when the validator stops validating the Subnet.
stakeAmount - string - (optional) the amount of nAVAX this validator staked. Omitted if subnetID is not the Primary. Please note that stakeAmount has been deprecated and will be removed in the future. Referring to weight is highly suggested Network.
nodeID - string - (optional) the validator’s node ID.
connected - bool - (optional) if the node is connected.
weight - string - (optional) the validator’s weight when sampling validators. Omitted if subnetID is the Primary Network.
txID - string - the validator transaction.
startTime - string - the Unix time when the validator starts.
endTime - string - the Unix time when the validator stops.
stakeAmount - string - (optional) the amount of nAVAX this validator staked. Omitted if subnetID is not the Primary Network.
nodeID - string - (optional) the validating node’s node ID.
Code Examples:
curl --location --request POST http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ext/bc/P \ --header 'Content-Type: application/json' \ --data-raw '{ "jsonrpc": "2.0", "method": "platform.getPendingValidators", "params": { "subnetID": null, "nodeIDs": [] }, "id": 1 }'
const ethers = require("ethers"); (async () => { const provider = new ethers.providers.JsonRpcProvider( "http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ext/bc/P" ); const params = { "subnetID": null, "nodeIDs": [], }; const result = await provider.send("platform.getPendingValidators", params); console.log(result); })();
from web3 import Web3, HTTPProvider w3 = Web3(HTTPProvider('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ext/bc/P')) params = { "subnetID": None, "nodeIDs": [] } request = w3.provider.make_request('platform.getPendingValidators', [params]) print(request)