getinfo - Zcash
Example code for the getinfo JSON-RPC method. Complete guide on how to use the getinfo JSON-RPC method in GetBlock.io Web3 documentation.
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
curl --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"
}'const 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);import 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())Response
{
"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
version
integer
Zebra numeric version (e.g. 6030000 = 6.3.0)
build
string
Zebra semver build string
subversion
string
User agent string sent to peers
protocolversion
integer
P2P protocol version
blocks
integer
Current best-known chain tip height
connections
integer
Number of active peer connections
difficulty
number
Current proof-of-work difficulty as a multiple of the minimum
testnet
boolean
true if this endpoint serves Testnet, false for Mainnet
paytxfee
number
Wallet fee setting — always 0.0 on Zebra (no wallet functionality)
relayfee
number
Minimum relay fee in ZEC/kB
errors
string
Most recent error message, if any
errorstimestamp
string
Timestamp 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
blocksfield to detect chain tip advancementClient Version Detection: Distinguish Zebra endpoints from remaining zcashd fallbacks by inspecting
buildandsubversionNetwork Discovery: Confirm whether an endpoint is serving Mainnet or Testnet via the
testnetfieldConnection Diagnostics: Detect P2P isolation via low
connectionscount on a self-hosted node
Error Handling
-32603
Internal error
Node failed to compile the info payload (rare, transient upstream error)
Last updated
Was this helpful?