Bitcoin Cash (BCH)
Bitcoin Cash is a Layer 1 proof-of-work blockchain that forked from Bitcoin in August 2017 to prioritize on-chain payment capacity. It raised the block size limit well beyond Bitcoin's, targeting low fees and fast confirmation for everyday transactions and peer-to-peer digital cash. The network is maintained by independent node implementations, including Bitcoin Cash Node, and retains the UTXO model and Bitcoin Core-style JSON-RPC interface.
Key Features
- Large Blocks: A raised block size limit supports high on-chain transaction throughput
- Low Fees: Ample block space keeps per-transaction fees low under normal load
- UTXO Model: Uses the unspent transaction output model inherited from Bitcoin
- CashAddr Addresses: Uses the CashAddr format to reduce confusion with Bitcoin addresses
- Proof of Work: Secured by SHA-256 proof of work with a responsive difficulty adjustment
- Block Finalization: Bitcoin Cash Node finalizes deeply buried blocks against deep reorganizations
- Schnorr Signatures: Supports Schnorr signatures for smaller multisig and improved privacy
- Bitcoin Core RPC: Exposes a JSON-RPC interface familiar to Bitcoin developers
TECHNICAL DISCLAIMER: AUTHORITATIVE JSON-RPC API SPECIFICATION.
GetBlock's RPC API reference documentation is provided exclusively for informational purposes and to optimize the developer experience. The canonical and normative specification for Bitcoin Cash Node RPC methods is solely maintained and published through the official Bitcoin Cash Node documentation. This resource constitutes the sole authoritative reference implementation of the JSON-RPC 2.0 protocol interface across Bitcoin Cash node clients.
Network Information
| Property | Value |
|---|---|
| Network Name | Bitcoin Cash Mainnet |
| Native Currency | BCH (1 BCH = 100,000,000 satoshis) |
| Consensus | Proof of Work (SHA-256) |
| Address Format | CashAddr and legacy Base58 |
| Model | UTXO |
| Node Software | Bitcoin Cash Node |
Base URL
bashhttps://shared.eu-central-1.getblock.ioSupported Networks
| Network | JSON RPC | REST | Blockbook (REST) | Blockbook (WebSocket) |
|---|---|---|---|---|
| Mainnet | ✅ | ✅ | ✅ | ✅ |
Quickstart
In this section, you will learn how to make your first call with either:
- Javascript(Axios)
- Python
Setup project
Create and initialize a new project:
bash
mkdir bch-api-quickstart cd bch-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
const axios = require('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 => { const blockNumber = parseInt(response.data.result, 16); console.log('Current Block Number:', blockNumber); }) .catch(error => console.error(error));Replace
<ACCESS-TOKEN>with your actual GetBlock access token.Run the script
bash
node index.jsExpected output (example):
json
Current Block Number: 961833
Set up the project directory
bash
mkdir bch-api-quickstart cd bch-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
Support
For technical support and questions:
- Support: support@getblock.io