Granite Upgrade Activates in11d:16h:54m:33s
Chain Metrics

Get staking metrics for a given subnet

Gets staking metrics for a given subnet.

GET
/v2/networks/{network}/metrics/{metric}

Path Parameters

metricstring

Which network level metric to fetch.

Value in"delegatorCount" | "delegatorWeight" | "validatorCount" | "validatorWeight"
networkstring

Either mainnet or testnet/fuji.

Value in"mainnet" | "fuji" | "testnet"

Query Parameters

startTimestamp?integer

Query param for retrieving items after a specific timestamp.

Range0 <= value
endTimestamp?integer

Query param for retrieving items before a specific timestamp.

Range0 <= value
pageToken?string

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

pageSize?integer

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

Default100
Range1 <= value <= 2160
subnetId?unknown

The subnet ID to filter by. If not provided, then all subnets will be returned.

Default"11111111111111111111111111111111LpoYY"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://metrics.avax.network/v2/networks/mainnet/metrics/validatorCount?startTimestamp=1689541049&endTimestamp=1689800249&pageSize=10&subnetId=11111111111111111111111111111111LpoYY"
{
  "nextPageToken": "string",
  "results": [
    {
      "value": 0,
      "timestamp": 0
    }
  ]
}
{
  "message": "string",
  "statusCode": 400,
  "error": "Bad Request"
}
{
  "message": "string",
  "statusCode": 401,
  "error": "Unauthorized"
}
{
  "message": "string",
  "statusCode": 403,
  "error": "Forbidden"
}
{
  "message": "string",
  "statusCode": 404,
  "error": "Not Found"
}
{
  "message": "string",
  "statusCode": 429,
  "error": "Too Many Requests"
}
{
  "message": "string",
  "statusCode": 500,
  "error": "Internal Server Error"
}
{
  "message": "string",
  "statusCode": 502,
  "error": "Bad Gateway"
}
{
  "message": "string",
  "statusCode": 503,
  "error": "Service Unavailable"
}

Is this guide helpful?