POSTblock

NEAR Mainnethttps://near-mainnet.nodit.io/

Returns the block header, the block producer account, and the list of chunk headers included in the block.

Use finality to get the latest block, or block_id (block height or block hash) to get a specific block. The two cannot be used together. If the block cannot be found, the UNKNOWN_BLOCK error is returned; if the node is still syncing, the NOT_SYNCED_YET error is returned. Transactions live in chunks, so call the chunk method with chunks[].chunk_hash to get them.

Request Body
jsonrpcstringrequired
idstringrequired

Request ID. Any string; it is returned unchanged in the response.

methodstringrequired
finalitystring (enum)

Specifies the block finality. Cannot be used together with block_id.

  • optimistic: the latest block the node has received (may be reorganized)
  • near-final: a Doomslug-final block (not reverted in most cases)
  • final: a fully finalized block
block_idinteger

Specifies the block to query by block height (integer) or block hash (base58 string). Cannot be used together with finality.

sync_checkpointstring (enum)

Block selector. genesis returns the genesis block; earliest_available returns the oldest block the node holds.

Responses
jsonrpcstring

JSON-RPC version

idstring

Request ID

authorstring

Account ID of the validator that produced the block

headerobject

Block header

heightinteger

Block height.

Example: 220785385

prev_heightinteger

Previous block height

hashstring

Block hash (base58)

prev_hashstring

Previous block hash (base58)

epoch_idstring

Epoch ID of the block (base58)

next_epoch_idstring

Next epoch ID (base58)

prev_state_rootstring

Previous state root (base58)

chunk_receipts_rootstring

Merkle root of chunk receipts (base58)

chunk_headers_rootstring

Merkle root of chunk headers (base58)

chunk_tx_rootstring

Merkle root of chunk transactions (base58)

outcome_rootstring

Merkle root of execution outcomes (base58)

chunks_includedinteger

Number of new chunks included in this block

chunk_maskboolean[]

Per shard, in shard order, whether this block includes a new chunk (true included, false missing)

challenges_rootstring

Merkle root of challenges (base58)

challenges_resultobject[]

List of slashed validators

timestampinteger

Block timestamp (Unix nanoseconds). Legacy numeric value; use timestamp_nanosec instead.

timestamp_nanosecstring

Block timestamp (Unix nanoseconds, decimal string)

random_valuestring

Random value of the block (base58)

validator_proposalsobject[]

Validator stake changes proposed in this block

gas_pricestring

Gas price of this block (yoctoNEAR, decimal string)

block_ordinalinteger

Ordinal of this block since genesis. Heights without a block are not counted.

total_supplystring

Total NEAR supply (yoctoNEAR, decimal string)

last_final_blockstring

Hash of the last fully final block (base58)

last_ds_final_blockstring

Hash of the last Doomslug-final block (base58)

next_bp_hashstring

Hash of the next epoch's block producer set (base58)

block_merkle_rootstring

Merkle root of all block hashes from genesis up to the previous block (base58)

block_body_hashstring

Block body hash (base58)

epoch_sync_data_hashstring

Epoch sync data hash. null when not applicable.

approvalsstring[]

Validator signatures approving this block. Positions of validators that did not approve are null.

chunk_endorsementsinteger[][]

Per chunk, a bitmap (byte array) of validator endorsements

signaturestring

Signature of the block producer

latest_protocol_versioninteger

Latest protocol version supported by the block producer

shard_splitobject[]

Shard split info during resharding, [shard ID, boundary account ID]. null when not applicable.

rent_paidstring

Deprecated field; always "0".

validator_rewardstring

Deprecated field; always "0".

chunksobject[]

Chunk headers in the block (one per shard)

chunk_hashstring

Chunk hash (base58)

prev_block_hashstring

Previous block hash (base58)

outcome_rootstring

Merkle root of this chunk's execution outcomes (base58)

prev_state_rootstring

Shard state root before the chunk is applied (base58)

encoded_merkle_rootstring

Merkle root of the encoded chunk data (base58)

encoded_lengthinteger

Size of the encoded chunk data (bytes)

height_createdinteger

Block height at which the chunk was created

height_includedinteger

Block height at which the chunk was included

shard_idinteger

ID of the shard the chunk belongs to

gas_usedinteger

Gas used in the chunk

gas_limitinteger

Gas limit of the chunk

balance_burntstring

Amount burnt in the chunk (yoctoNEAR, decimal string)

outgoing_receipts_rootstring

Merkle root of receipts sent to other shards (base58)

tx_rootstring

Merkle root of the transactions in the chunk (base58)

validator_proposalsobject[]

Validator stake changes proposed in the chunk

congestion_infoobject

Shard congestion info. Total gas of delayed and buffered receipts (delayed_receipts_gas, buffered_receipts_gas), receipt size (receipt_bytes), and the allowed shard (allowed_shard).

bandwidth_requestsobject

Bandwidth this shard requests for sending to other shards

proposed_splitobject

Shard split proposed for dynamic resharding. null when there is no proposal.

signaturestring

Signature of the chunk producer

rent_paidstring

Deprecated field; always "0".

validator_rewardstring

Deprecated field; always "0".

namestring (enum)

Error class. REQUEST_VALIDATION_ERROR (invalid request), HANDLER_ERROR (processing error), INTERNAL_ERROR (node internal error)

causeobject

The specific cause of the error.

namestring

Name of the error cause (e.g. UNKNOWN_BLOCK, UNKNOWN_ACCOUNT, PARSE_ERROR)

infoobject

Additional information about the error (block hash, height, account ID, etc.)

codeinteger

Legacy JSON-RPC error code (e.g. -32000 server error, -32700 parse error, -32601 method not found)

messagestring

Legacy error message

datastring

Legacy error details

X-API-KEY
RequestCU30
cURL
curl -X POST "https://near-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "dontcare",
    "method": "block",
    "params": {
      "finality": "final",
      "block_id": 220785385,
      "sync_checkpoint": "genesis"
    }
  }'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": "dontcare",
  "result": {
    "author": "staked.poolv1.near",
    "chunks": [
      {
        "balance_burnt": "0",
        "bandwidth_requests": {
          "V1": {
            "requests": []
          }
        },
        "chunk_hash": "Bwb7e4kc3EazNa2UNS18LGwpCUNtKCebcMwEDckqVAuW",
        "congestion_info": {
          "allowed_shard": 12,
          "buffered_receipts_gas": "0",
          "delayed_receipts_gas": "0",
          "receipt_bytes": 0
        },
        "encoded_length": 526,
        "encoded_merkle_root": "3PtDhuYvav6hrN9GGu5wVPx7p3KptKaCX99YzdjvuKbj",
        "gas_limit": 1000000000000000,
        "gas_used": 0,
        "height_created": 220785299,
        "height_included": 220785299,
        "outcome_root": "11111111111111111111111111111111",
        "outgoing_receipts_root": "GkXFM5VkSNfBLbDv8igetxFxFj9f3pcsnjKC37w1CzCA",
        "prev_block_hash": "EchVfdovVaSQLUp4p5hXg9mxRow7VyfA1w5Ax5ev3iV2",
        "prev_state_root": "8PiaWyhACTaqbPe8LPeYAtPFgZjrLv6JsRg64cNRWAPe",
        "proposed_split": null,
        "rent_paid": "0",
        "shard_id": 10,
        "signature": "ed25519:4R3aGDYqfSVE1x8SZr7rhjqCPEVHfdCvdDJem6K5evttEEYNgb3V3WvAYQ2BENAZ5SZdVXe62zfFqewxPCLcaZCH",
        "tx_root": "BG1meqDgUX7erusU7UN5YH5q6UKrJccqftT9jrTdyb2L",
        "validator_proposals": [],
        "validator_reward": "0"
      }
    ],
    "header": {
      "approvals": [
        "ed25519:5pArAaaPNqRtpADvoPj1H4TgjCbZBE39zBNtBwxjhcv7eV3HshPYWjt7HXEcBJdgM8ixm2BUSu8uM2qtyaiECyHR",
        null,
        "ed25519:4L6tc96TFgZizbbrvJwR3qSQmW6Ausyk885AauEVyTiL3yyjxPDhdkUDcXVd1USKM8RQvhD1EDH7i3Q7fxd3t7NF"
      ],
      "block_body_hash": "J41ZLCseK6js1ASgFhUn25BZKxjcun1WzUG4e78D7qdj",
      "block_merkle_root": "52caYEBuLZAyi1cc989o7XMjxpYuN3bwZPazH86e8JmF",
      "block_ordinal": 210502101,
      "challenges_result": [],
      "challenges_root": "11111111111111111111111111111111",
      "chunk_endorsements": [
        [
          255,
          255,
          255,
          255,
          255,
          239,
          255,
          255,
          255,
          255,
          31
        ],
        [
          191,
          255,
          255,
          251,
          255,
          255,
          255,
          255,
          255,
          255,
          255
        ]
      ],
      "chunk_headers_root": "BLRC86rr3T4RTjU2ERBJ8fRwgDbXs2mjsniSQxnY5Aep",
      "chunk_mask": [
        true,
        true,
        true,
        true,
        true,
        true,
        true,
        true,
        true,
        true
      ],
      "chunk_receipts_root": "DZbVK4k3FWohzvvTjnqMcjXXJLe71WxdJ8yoed5ZT2Ps",
      "chunk_tx_root": "HowTjCgDSH1vWSN5pMjAaUkeirp921G32cVCUz5MCv9d",
      "chunks_included": 10,
      "epoch_id": "8nD4ksRUJxEvy6E1MW3ySPrLjMq3CQsyXV7cFWvygF84",
      "epoch_sync_data_hash": null,
      "gas_price": "100000000",
      "hash": "8EjuQRnAJiWkRmqxfexQFJWXXonuSMbz5AZziJLCWnWS",
      "height": 220785299,
      "last_ds_final_block": "EchVfdovVaSQLUp4p5hXg9mxRow7VyfA1w5Ax5ev3iV2",
      "last_final_block": "GGZKxKARnwakArG6pH4fWdeoUiufLZubRkTKow7NvGsc",
      "latest_protocol_version": 86,
      "next_bp_hash": "BGT48bNJCiuCRVZ3LTc19KxdCpbPWLD4diVyojZPHUv",
      "next_epoch_id": "5nSkRGUryuexhDhM5dijPqLANjDojGJuzaB1euBZd9L4",
      "outcome_root": "2JDJZw5jBFSUVEL2EqTXMuBYFE5oxjogkf8ido9o9P3Y",
      "prev_hash": "EchVfdovVaSQLUp4p5hXg9mxRow7VyfA1w5Ax5ev3iV2",
      "prev_height": 220785298,
      "prev_state_root": "8QuW2NoHrz8Kq3FFL6bAKHnDqm7JEZMbtQrteHz2VdE4",
      "random_value": "Xry2MVhrWuABJPV4imyDrNtAy7fuvjt5nMnUh1BhECN",
      "rent_paid": "0",
      "shard_split": null,
      "signature": "ed25519:5X6StERGxnp981b6vaESU7zKCKq4cKuNp1eiK5HNVNgGuhittVwoRRxpFzMGkWGUunmxg6xkg14dvzrcz8EQTjAx",
      "timestamp": 1792488886653359000,
      "timestamp_nanosec": "1792488886653358989",
      "total_supply": "1309454919110724559340264222147072",
      "validator_proposals": [],
      "validator_reward": "0"
    }
  }
}

Last updated