Granite Upgrade Activates in11d:16h:53m:16s
Blocks

List blocks proposed by node

Lists the latest blocks proposed by a given NodeID on one of the Primary Network chains.

GET
/v1/networks/{network}/blockchains/{blockchainId}/nodes/{nodeId}/blocks
x-glacier-api-key<token>

Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://build.avax.network/console/utilities/data-api-keys.

In: header

Path Parameters

blockchainIdstring

A primary network blockchain id or alias.

Value in"11111111111111111111111111111111LpoYY" | "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM" | "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm" | "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5" | "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp" | "p-chain" | "x-chain" | "c-chain"
networkstring

Either mainnet or testnet/fuji.

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

A primary network (P or X chain) nodeId.

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 100.

Default10
Range1 <= value <= 100

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://data-api.avax.network/v1/networks/mainnet/blockchains/p-chain/nodes/NodeID-111111111111111111116DBWJs/blocks?startTimestamp=1689541049&endTimestamp=1689800249&pageSize=10"
{
  "nextPageToken": "string",
  "blocks": [
    {
      "blockNumber": "string",
      "blockHash": "string",
      "parentHash": "string",
      "blockTimestamp": 0,
      "blockType": "string",
      "txCount": 0,
      "transactions": [
        "string"
      ],
      "blockSizeBytes": 0,
      "l1ValidatorsAccruedFees": 0,
      "activeL1Validators": 0,
      "currentSupply": "string",
      "proposerDetails": {
        "proposerId": "string",
        "proposerParentId": "string",
        "proposerNodeId": "string",
        "proposerPChainHeight": 0,
        "proposerTimestamp": 0
      }
    }
  ],
  "chainInfo": {
    "chainName": "p-chain",
    "network": "mainnet"
  }
}
{
  "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?