Zcash(ZEC)

Zcash is a proof-of-work privacy-preserving cryptocurrency built by the Electric Coin Company and the Zcash Foundation, using zk-SNARKs to enable optional shielded transactions with unlinkable senders, recipients, and amounts. The network exposes a Bitcoin Core-compatible JSON-RPC interface extended with z_* methods for shielded-pool operations. GetBlock serves Zcash from zebrad, the Rust full node maintained by the Zcash Foundation, which has replaced the deprecated zcashd. Zebra's JSON-RPC interface follows Bitcoin Core's method names but returns a smaller set of fields for several of them, so clients ported from Bitcoin Core should check each method's response rather than assume parity.

Key Features

  • Optional Shielded Transactions: Sapling and Orchard pools provide zk-SNARK-backed transaction privacy alongside transparent Bitcoin-style UTXOs
  • NU6.3 Consensus: Latest Zcash network upgrade with Ironwood note commitment tree extension for improved shielded-pool queries
  • Bitcoin Core-Style RPC: Familiar method names for infrastructure developers, though Zebra returns fewer fields than bitcoind for several methods
  • Unified Addresses: Standardized addresses combining transparent, Sapling, and Orchard receivers into a single string
  • Equihash Proof-of-Work: Memory-hard mining algorithm resistant to specialized ASIC dominance

GetBlock's RPC API reference documentation is provided exclusively for informational purposes and to optimize the developer experience. The canonical and normative specification for Zcash JSON-RPC methods is solely maintained and published through the official Zcash Foundation documentation portal at zebra.zfnd.org and the zebra-rpc crate at docs.rs

Network Information

PropertyValue
Network NameZcash
Native CurrencyZEC
Decimals8
Block Time75 seconds
ConsensusProof-of-Work(PoW)

Base URL

bashhttps://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

Supported Networks

NetworkJSON-RPCBlockbook (REST)Blockbook (WebSocket)
Mainnet✅✅✅

Mainnet is served from the Frankfurt, Germany region.

Quickstart

  1. Setup project

    Create and initialize a new project:

    bashmkdir zec-api-quickstart
    cd zec-api-quickstart
    npm init --yes
  2. Install Axios

    bashnpm install axios
  3. Create file

    Create a new file named index.js. This is where you will make your first call.

  4. Set ES module type

    Set the ES module "type": "module" in your package.json.

  5. Add code

    Add the following code to index.js:

    index.js

    javascriptimport axios from 'axios';
    
    const url = 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/';
    
    const payload = {
      jsonrpc: '2.0',
      method: 'getblockcount',
      params: [],
      id: 'getblock.io'
    };
    
    axios.post(url, payload, {
      headers: { 'Content-Type': 'application/json' }
    })
    .then(response => {
      console.log('Current block height:', response.data.result);
    })
    .catch(error => console.error(error));

    Replace <ACCESS-TOKEN> with your actual access token from GetBlock.

  6. Run the script

    bashnode index.js

    Expected output (example):

    json{
        "jsonrpc": "2.0",
        "result": 3487840,
        "id": "getblock.io"
    }
  1. Set up the project directory

    bashmkdir zec-api-quickstart
    cd zec-api-quickstart
  2. Create and activate a virtual environment

    bashpython -m venv venv
    source venv/bin/activate
    
    # On Windows, use venv\Scripts\activate
  3. Install requests

    bashpip install requests
  4. Create script

    Create a file called main.py with the following content:

    main.py

    pythonimport requests
    import json
    
    url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"
    
    payload = json.dumps({
        "jsonrpc": "2.0",
        "method": "getblockcount",
        "params": [],
        "id": "getblock.io"
    })
    
    headers = {
        'Content-Type': 'application/json'
    }
    
    response = requests.post(url, headers=headers, data=payload)
    print(response.text)

    Replace <ACCESS-TOKEN> with your actual access token from GetBlock.

  5. Run the script

    bashpython main.py

Available Methods

Zcash is documented across three interfaces, each provisioned as its own endpoint.

Zcash JSON-RPC API

The Zebra node interface: blocks, transactions, mempool, mining, transparent address queries, and z_* methods for the shielded pools.

Zcash Blockbook REST API

Address- and xpub-indexed queries over HTTP for transparent addresses: balances, transaction history, unspent outputs, balance history, and fiat rates.

Zcash Blockbook (WebSocket) API

The same indexed queries over a persistent connection, plus subscriptions to new blocks and to activity on a set of addresses.

Address lookups — the JSON-RPC getaddress* methods and every Blockbook address, UTXO, and xpub query — cover transparent (t1, t3) addresses only. Shielded Sapling and Orchard notes are encrypted to the holder's viewing key, so no public endpoint can list a shielded balance. Individual transactions still expose their shielded components, such as spends, outputs, and each pool's value balance, through JSON-RPC getrawtransaction and Blockbook tx-specific.

Support

For technical support and questions: