getinfo - Zcash

This method returns basic information about the Zebra node handling the request — build version, network protocol version, current best block height, and connection count. It's the standard starting point for any diagnostic or health-check flow against a Zcash endpoint.

Parameters

This method takes no parameters.

Request

bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "getinfo",
    "params": [],
    "id": "getblock.io"
}'

example.js

javascriptconst axios = require('axios');

const response = await axios.post('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', {
    jsonrpc: '2.0',
    method: 'getinfo',
    params: [],
    id: 'getblock.io'
}, {
    headers: { 'Content-Type': 'application/json' }
});

console.log(response.data.result);

example.py

pythonimport requests

response = requests.post(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
    headers={'Content-Type': 'application/json'},
    json={
        'jsonrpc': '2.0',
        'method': 'getinfo',
        'params': [],
        'id': 'getblock.io'
    }
)

print(response.json())

example.rs

rustuse reqwest::Client;
use serde_json::{json, Value};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    
    let response = client
        .post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
        .header("Content-Type", "application/json")
        .json(&json!({
            "jsonrpc": "2.0",
            "method": "getinfo",
            "params": [],
            "id": "getblock.io"
        }))
        .send()
        .await?
        .json::<Value>()
        .await?;
    
    println!("Result: {}", response["result"]);
    Ok(())
}

Response

json{
    "jsonrpc": "2.0",
    "result": {
        "version": 6030000,
        "build": "v6.3.0",
        "subversion": "/Zebra:6.3.0/",
        "protocolversion": 170160,
        "blocks": 3487829,
        "connections": 75,
        "difficulty": 283406385.74557334,
        "testnet": false,
        "paytxfee": 0.0,
        "relayfee": 1e-06,
        "errors": "chain tip metrics channel closed",
        "errorstimestamp": 1789640906
    },
    "id": "getblock.io"
}

Response Parameters

ParameterTypeDescription
versionintegerZebra numeric version (e.g. 6030000 = 6.3.0)
buildstringZebra semver build string
subversionstringUser agent string sent to peers
protocolversionintegerP2P protocol version
blocksintegerCurrent best-known chain tip height
connectionsintegerNumber of active peer connections
difficultynumberCurrent proof-of-work difficulty as a multiple of the minimum
testnetbooleantrue if this endpoint serves Testnet, false for Mainnet
paytxfeenumberWallet fee setting — always 0.0 on Zebra (no wallet functionality)
relayfeenumberMinimum relay fee in ZEC/kB
errorsstringMost recent error message, if any
errorstimestampstringTimestamp of the most recent error

Use Cases

  • Node Health Probe: Baseline liveness check as part of an endpoint availability monitor
  • Chain Progress Monitoring: Poll the blocks field to detect chain tip advancement
  • Client Version Detection: Distinguish Zebra endpoints from remaining zcashd fallbacks by inspecting build and subversion
  • Network Discovery: Confirm whether an endpoint is serving Mainnet or Testnet via the testnet field
  • Connection Diagnostics: Detect P2P isolation via low connections count on a self-hosted node

Error Handling

Error CodeMessageDescription
-32603Internal errorNode failed to compile the info payload (rare, transient upstream error)