GET
/
v1
/
networks
/
{network}
/
validators
/
{nodeId}
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";

const avaCloudSDK = new AvaCloudSDK({
  chainId: "43114",
  network: "mainnet",
});

async function run() {
  const result = await avaCloudSDK.data.primaryNetwork.getSingleValidatorDetails({
    network: "mainnet",
    nodeId: "NodeID-111111111111111111116DBWJs",
    validationStatus: "completed",
    sortOrder: "asc",
  });

  for await (const page of result) {
    // Handle the page
    console.log(page);
  }
}

run();
{
  "nextPageToken": "<string>",
  "validators": [
    {
      "txHash": "<string>",
      "nodeId": "<string>",
      "subnetId": "<string>",
      "amountStaked": "<string>",
      "delegationFee": "<string>",
      "startTimestamp": 123,
      "endTimestamp": 123,
      "blsCredentials": {
        "publicKey": "<string>",
        "proofOfPossession": "<string>"
      },
      "delegatorCount": 123,
      "amountDelegated": "<string>",
      "rewards": {
        "validationRewardAmount": "<string>",
        "delegationRewardAmount": "<string>",
        "rewardAddresses": [
          "<string>"
        ],
        "rewardTxHash": "<string>"
      },
      "validationStatus": "completed"
    }
  ]
}

Authorizations

x-glacier-api-key
string
header
required

Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.

Path Parameters

network
enum<string>
required

Either mainnet or testnet/fuji.

Available options:
mainnet,
fuji,
testnet,
devnet
nodeId
string
required

A primary network (P or X chain) nodeId.

Query Parameters

pageToken
string

A page token, received from a previous list call. Provide this to retrieve the subsequent page.

pageSize
integer
default:
10

The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.

Required range: 1 < x < 100
validationStatus
enum<string>

Validation status of the node.

Available options:
completed,
active,
pending,
removed
sortOrder
enum<string>

The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the sortBy query parameter, if provided.

Available options:
asc,
desc

Response

200
application/json
Successful response
validators
object[]
required

The list of validator Details.

nextPageToken
string

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.