import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.metrics.subnets.getValidators({
startTimestamp: 1689541049,
endTimestamp: 1689800249,
pageSize: 10,
subnetId: "11111111111111111111111111111111LpoYY",
network: "mainnet",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"addresses": [
{
"addresses": [
"<string>"
],
"sortKey": "<string>"
}
],
"nextPageToken": "<string>"
}Get list of addresses and AddValidatorTx timestamps set to receive awards for validation periods during the specified time frame.
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.metrics.subnets.getValidators({
startTimestamp: 1689541049,
endTimestamp: 1689800249,
pageSize: 10,
subnetId: "11111111111111111111111111111111LpoYY",
network: "mainnet",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"addresses": [
{
"addresses": [
"<string>"
],
"sortKey": "<string>"
}
],
"nextPageToken": "<string>"
}The subnet ID to filter by.
Query param for retrieving items after a specific timestamp.
x >= 0Query param for retrieving items before a specific timestamp.
x >= 0A page token, received from a previous list call. Provide this to retrieve the subsequent page.
The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 5000.
1 <= x <= 5000Either mainnet or testnet/fuji.
mainnet, fuji, testnet Was this page helpful?