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

PropertyValue
Network NameBitcoin Cash Mainnet
Native CurrencyBCH (1 BCH = 100,000,000 satoshis)
ConsensusProof of Work (SHA-256)
Address FormatCashAddr and legacy Base58
ModelUTXO
Node SoftwareBitcoin Cash Node

Base URL

bashhttps://shared.eu-central-1.getblock.io

Supported Networks

NetworkJSON RPCRESTBlockbook (REST)Blockbook (WebSocket)
Mainnet✅✅✅✅

Quickstart

In this section, you will learn how to make your first call with either:

  • Javascript(Axios)
  • Python
  1. Setup project

    Create and initialize a new project:

    bashmkdir bch-api-quickstart
    cd bch-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

    javascriptconst 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.

  6. Run the script

    bashnode index.js

    Expected output (example):

    jsonCurrent Block Number: 961833
  1. Set up the project directory

    bashmkdir bch-api-quickstart
    cd bch-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

Support

For technical support and questions:

See Also