getInfo - Zcash

Returns the indexer's identity and sync state, together with the backend node's consensus branch IDs. Use it as a connection health check and to confirm the indexer has caught up before trusting an address query.

Parameters

This method takes no parameters. Send an empty params object.

Message

bashwscat -c wss://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>

# then send:
{
    "id": "getblock.io",
    "method": "getInfo",
    "params": {}
}

Response

json{
    "id": "getblock.io",
    "data": {
        "name": "Zcash",
        "shortcut": "ZEC",
        "network": "ZEC",
        "decimals": 8,
        "version": "unknown",
        "bestHeight": 3489836,
        "bestHash": "000000000061b35bd0656948f37e2f8510905be8fc678c028481fa9e8f411f70",
        "block0Hash": "00040fe8ec8471911baa1db1266ea15dd06b4a8a5c453883c000b031973dce08",
        "testnet": false,
        "backend": {
            "version": "zebra",
            "consensus": {
                "chaintip": "37a5165b",
                "nextblock": "37a5165b"
            }
        }
    }
}

Response Fields

FieldTypeDescription
namestringCoin name
shortcutstringCoin ticker
networkstringNetwork identifier
decimalsintegerDecimal places in the coin's base unit
bestHeightintegerHeight of the best block the indexer has processed
bestHashstringHash of the best block the indexer has processed
block0HashstringGenesis block hash
testnetbooleanTrue when the endpoint serves a test network
backend.versionstringBackend implementation. Reported as zebra, with no version number
backend.consensus.chaintipstringConsensus branch ID in force at the chain tip
backend.consensus.nextblockstringConsensus branch ID that will apply to the next block

Zcash is the only Blockbook chain whose backend carries a consensus object. Those values are consensus branch IDs, which change at each network upgrade, and every transaction must be signed for the branch in force. When nextblock differs from chaintip, an upgrade activates at the next block and signing software has to switch.

backend.version reads zebra with no version number. Read the exact node version from the JSON-RPC getinfo method instead.

Use Cases

  • Health Checks: Confirm the connection and the indexer are live
  • Sync Verification: Compare bestHeight against an independent source
  • Upgrade Detection: Watch consensus.nextblock differ from chaintip ahead of a network upgrade
  • Network Assertion: Check block0Hash and testnet to confirm the chain

Error Handling

ErrorMessageDescription
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect