Documentation index

getBlockProduction

Returns recent block production information from the current or previous epoch. This is critical for monitoring validator performance, identifying leader slots, and analyzing network participation rates. Staking operators and delegation services rely on this data to assess validator reliability and uptime.

Parameters

#TypeRequiredDescription
1objectNoConfiguration object

Configuration object fields:

FieldTypeDescription
commitmentstringCommitment level: processed, confirmed, or finalized
identitystringOnly return results for this validator identity (base-58 encoded)
rangeobjectSlot range: { firstSlot: number, lastSlot?: number }. Defaults to current epoch

Response

Returns an RpcResponse object:

FieldTypeDescription
context.slotu64The slot at which the value was read
value.byIdentityobjectDictionary of validator identities mapped to [leaderSlots, blocksProduced]
value.rangeobjectBlock production slot range: { firstSlot, lastSlot }

Code Examples

cURL

Terminal
curl http://88.216.36.108:7999 -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockProduction",
  "params": [
    { "commitment": "finalized" }
  ]
}'

TypeScript

TypeScript
const response = await fetch("http://88.216.36.108:7999", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "getBlockProduction",
    params: [
      { commitment: "finalized" }
    ]
  }),
});
const { result } = await response.json();
console.log("Validators:", Object.keys(result.value.byIdentity).length);

Python

Python
import requests

response = requests.post("http://88.216.36.108:7999", json={
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBlockProduction",
    "params": [
        {"commitment": "finalized"}
    ]
})
result = response.json()["result"]
print(f"Validators: {len(result['value']['byIdentity'])}")

Rust

Rust
use reqwest::Client;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    let res = client.post("http://88.216.36.108:7999")
        .json(&json!({
            "jsonrpc": "2.0",
            "id": 1,
            "method": "getBlockProduction",
            "params": [
                {"commitment": "finalized"}
            ]
        }))
        .send().await?
        .text().await?;
    println!("{}", res);
    Ok(())
}

Example Response

JSON
{
  "jsonrpc": "2.0",
  "result": {
    "context": { "slot": 166974442 },
    "value": {
      "byIdentity": {
        "85iYT5RuzRTDgjyRa3cP8SYhM2j21fj7NhfJ3peu1DPr": [48, 47]
      },
      "range": { "firstSlot": 166950000, "lastSlot": 166974442 }
    }
  },
  "id": 1
}