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
bitcoindfor 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
| Property | Value |
|---|---|
| Network Name | Zcash |
| Native Currency | ZEC |
| Decimals | 8 |
| Block Time | 75 seconds |
| Consensus | Proof-of-Work(PoW) |
Base URL
bashhttps://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/Supported Networks
| Network | JSON-RPC | Blockbook (REST) | Blockbook (WebSocket) |
|---|---|---|---|
| Mainnet | ✅ | ✅ | ✅ |
Mainnet is served from the Frankfurt, Germany region.
Quickstart
Setup project
Create and initialize a new project:
bash
mkdir zec-api-quickstart cd zec-api-quickstart npm init --yesInstall Axios
bash
npm install axiosCreate file
Create a new file named
index.js. This is where you will make your first call.Set ES module type
Set the ES module
"type": "module"in yourpackage.json.Add code
Add the following code to
index.js:index.js
javascript
import 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.Run the script
bash
node index.jsExpected output (example):
json
{ "jsonrpc": "2.0", "result": 3487840, "id": "getblock.io" }
Set up the project directory
bash
mkdir zec-api-quickstart cd zec-api-quickstartCreate and activate a virtual environment
bash
python -m venv venv source venv/bin/activate # On Windows, use venv\Scripts\activateInstall requests
bash
pip install requestsCreate script
Create a file called
main.pywith the following content:main.py
python
import 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.Run the script
bash
python 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:
- Support: support@getblock.io