POSTvalidators

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

Returns the validators of the given epoch with their stakes and block and chunk production stats, along with next-epoch validators, staking proposals, and validators kicked out in the previous epoch.

Send params as an object in one of three forms: { "latest": null } for the latest epoch, { "epoch_id": "<epoch ID>" } for a specific epoch, or { "block_id": <block height or hash> } for the epoch containing that block. An epoch ID that cannot be found returns UNKNOWN_EPOCH, and missing validator information for the epoch on the node returns VALIDATOR_INFO_UNAVAILABLE. The Mainnet response lists hundreds of validators and reaches hundreds of KB; the example keeps one item per list.

Request Body
jsonrpcstringrequired
idstringrequired

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

methodstringrequired
latestobject

Set to null to query the latest epoch.

epoch_idstring

Epoch ID to query (base58). The ID of epoch T is the hash of the last block of epoch T-2.

block_idinteger

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

Responses
jsonrpcstring

JSON-RPC version

idstring

Request ID

current_validatorsobject[]

Validators of the current epoch.

account_idstring

NEAR account ID. A human-readable name (e.g. wrap.near) or a 64-character hex implicit account ID.

Example: wrap.near

public_keystring

Base58-encoded public key prefixed with ed25519: or secp256k1:.

Example: ed25519:168vdqFUxij2yvsxYgAGoykJMX7tgrPKVCH484A8nHP

stakestring

Staked amount (yoctoNEAR, decimal string)

is_slashedboolean

true if the validator has been slashed.

shardsinteger[]

IDs of the shards assigned to the validator as a chunk producer.

shards_endorsedinteger[]

IDs of the shards assigned to the validator as a chunk validator.

num_produced_blocksinteger

Number of blocks produced in this epoch.

num_expected_blocksinteger

Number of blocks expected to be produced in this epoch.

num_produced_chunksinteger

Number of chunks produced in this epoch.

num_expected_chunksinteger

Number of chunks expected to be produced in this epoch.

num_produced_chunks_per_shardinteger[]

Chunks produced per shard, in the order of shards.

num_expected_chunks_per_shardinteger[]

Chunks expected per shard, in the order of shards.

num_produced_endorsementsinteger

Number of chunk endorsements submitted in this epoch.

num_expected_endorsementsinteger

Number of chunk endorsements expected in this epoch.

num_produced_endorsements_per_shardinteger[]

Chunk endorsements submitted per shard, in the order of shards_endorsed.

num_expected_endorsements_per_shardinteger[]

Chunk endorsements expected per shard, in the order of shards_endorsed.

next_validatorsobject[]

Validators of the next epoch.

account_idstring

NEAR account ID. A human-readable name (e.g. wrap.near) or a 64-character hex implicit account ID.

Example: wrap.near

public_keystring

Base58-encoded public key prefixed with ed25519: or secp256k1:.

Example: ed25519:168vdqFUxij2yvsxYgAGoykJMX7tgrPKVCH484A8nHP

stakestring

Staked amount (yoctoNEAR, decimal string)

shardsinteger[]

IDs of the assigned shards.

current_proposalsobject[]

Staking proposals submitted in the current epoch.

account_idstring

NEAR account ID. A human-readable name (e.g. wrap.near) or a 64-character hex implicit account ID.

Example: wrap.near

public_keystring

Base58-encoded public key prefixed with ed25519: or secp256k1:.

Example: ed25519:168vdqFUxij2yvsxYgAGoykJMX7tgrPKVCH484A8nHP

stakestring

Staked amount (yoctoNEAR, decimal string)

validator_stake_struct_versionstring

Structure version. Currently V1.

current_fishermenobject[]

Fishermen of the current epoch. An empty array on Mainnet.

account_idstring

NEAR account ID. A human-readable name (e.g. wrap.near) or a 64-character hex implicit account ID.

Example: wrap.near

public_keystring

Base58-encoded public key prefixed with ed25519: or secp256k1:.

Example: ed25519:168vdqFUxij2yvsxYgAGoykJMX7tgrPKVCH484A8nHP

stakestring

Staked amount (yoctoNEAR, decimal string)

validator_stake_struct_versionstring

Structure version. Currently V1.

next_fishermenobject[]

Fishermen of the next epoch. An empty array on Mainnet.

account_idstring

NEAR account ID. A human-readable name (e.g. wrap.near) or a 64-character hex implicit account ID.

Example: wrap.near

public_keystring

Base58-encoded public key prefixed with ed25519: or secp256k1:.

Example: ed25519:168vdqFUxij2yvsxYgAGoykJMX7tgrPKVCH484A8nHP

stakestring

Staked amount (yoctoNEAR, decimal string)

validator_stake_struct_versionstring

Structure version. Currently V1.

prev_epoch_kickoutobject[]

Accounts removed from the validator set in the previous epoch.

account_idstring

NEAR account ID. A human-readable name (e.g. wrap.near) or a 64-character hex implicit account ID.

Example: wrap.near

reasonobject

The reason for removal. Too few blocks, chunks, or chunk endorsements (NotEnoughBlocks, NotEnoughChunks, NotEnoughChunkEndorsements, with produced and expected), insufficient stake (NotEnoughStake), and an outdated protocol version (ProtocolVersionTooOld) appear as objects; unstaking by the validator (Unstaked) and not getting a seat (DidNotGetASeat) appear as strings.

epoch_start_heightinteger

Block height at which the epoch started.

epoch_heightinteger

Epoch number counted from genesis.

validator_reward_paid_prev_epochobject

Per-validator rewards paid at the start of the previous epoch. Keys are account IDs and values are amounts (yoctoNEAR, decimal string).

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
RequestCU50
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": "validators",
    "params": {
      "block_id": 220785385
    }
  }'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": "dontcare",
  "result": {
    "current_fishermen": [],
    "current_proposals": [
      {
        "account_id": "00aboo203.pool.near",
        "public_key": "ed25519:2dJjJWXgvSG6iMbLFnhjrZhttrznxS225Wfq8Ffqz3Up",
        "stake": "40010610607843207343471898899",
        "validator_stake_struct_version": "V1"
      }
    ],
    "current_validators": [
      {
        "account_id": "astro-stakers.poolv1.near",
        "is_slashed": false,
        "num_expected_blocks": 1119,
        "num_expected_chunks": 5621,
        "num_expected_chunks_per_shard": [
          5621
        ],
        "num_expected_endorsements": 193958,
        "num_expected_endorsements_per_shard": [
          19396,
          19400,
          19393,
          19395,
          19389,
          19397,
          19402,
          19387,
          19402,
          19397
        ],
        "num_produced_blocks": 1119,
        "num_produced_chunks": 5617,
        "num_produced_chunks_per_shard": [
          5617
        ],
        "num_produced_endorsements": 192457,
        "num_produced_endorsements_per_shard": [
          19311,
          19316,
          19204,
          19319,
          19229,
          19267,
          19306,
          19244,
          18927,
          19334
        ],
        "public_key": "ed25519:2nPSBCzjqikgwrqUMcuEVReJhmkC91eqJGPGqH9sZc28",
        "shards": [
          13
        ],
        "shards_endorsed": [
          1,
          4,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13
        ],
        "stake": "33323585676140012127856017486253"
      }
    ],
    "epoch_height": 4883,
    "epoch_start_height": 220765934,
    "next_fishermen": [],
    "next_validators": [
      {
        "account_id": "astro-stakers.poolv1.near",
        "public_key": "ed25519:2nPSBCzjqikgwrqUMcuEVReJhmkC91eqJGPGqH9sZc28",
        "shards": [
          13
        ],
        "stake": "33322660870052523737784045263833"
      }
    ],
    "prev_epoch_kickout": [
      {
        "account_id": "centurion.poolv1.near",
        "reason": {
          "NotEnoughChunkEndorsements": {
            "expected": 43186,
            "produced": 0
          }
        }
      }
    ],
    "validator_reward_paid_prev_epoch": {
      "00aboo203.pool.near": "1594782896905328933871483",
      "01node.poolv1.near": "41264540477619761619796770"
    }
  }
}