Get validators from state
Returns filterable list of validators with their balance, status and index.
Information will be returned for all indices or public key that match known validators. If an index or public key does not match any known validator, no information will be returned but this will not cause an error. There are no guarantees for the returned data in terms of ordering; both the index and public key are returned for each validator, and can be used to confirm for which inputs a response has been returned.
Parameters
Name | Required | Type | Detail |
---|---|---|---|
state_id | ✅ | String | State identifier. Can be one of: "head" (canonical head in node's view), "genesis", "finalized", "justified", <hex encoded stateRoot with 0x prefix>. |
id | ❌ | array[String] | Either hex encoded public key (any bytes48 with 0x prefix) or validator index |
status | ❌ | array (Query) | pending_initialized or pending_queued or active_ongoing |
Result
Returns a filterable list of validators with their balance, status, and index.
Example
Request
curl <your-endpoint>/eth/v1/beacon/states/genesis/validators?id=1&status=active_ongoing
Return
{
"execution_optimistic": false,
"data": [
{
"index": "1",
"balance": "1",
"status": "active_ongoing",
"validator": {
"pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
"withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"effective_balance": "1",
"slashed": false,
"activation_eligibility_epoch": "1",
"activation_epoch": "1",
"exit_epoch": "1",
"withdrawable_epoch": "1"
}
}
]
}