Bitcoin Cash (BCH) is a peer-to-peer electronic cash system that originated as a hard fork of Bitcoin in 2017. It uses a larger block size to support higher on-chain transaction throughput, and is secured by proof-of-work mining.
The Bitcoin Cash API allows you to interact with the Bitcoin Cash network using JSON-RPC methods. Through the API, you can retrieve data about blocks, transactions, and the mempool, as well as broadcast new transactions to the network.
Check out our Bitcoin Cash API Quickstart guide for setup instructions, sample code, and your first API call.
Bitcoin Cash supports a richer scripting language than Bitcoin via the CashScript ecosystem and CashTokens, but it does not have a full smart contract virtual machine like Ethereum.
Bitcoin Cash Node and BCHN implement a standard JSON-RPC interface for querying blockchain data and submitting transactions, derived from Bitcoin Core.
When accessing the Bitcoin Cash network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.
You can use any HTTP client that supports JSON payloads, e.g. axios, fetch, requests, or curl. There are also Bitcoin-Cash-specific libraries like bchjs (Node.js) and bitcash (Python) for deeper integration.
The API works with any programming language that can send JSON over HTTP. Common choices include JavaScript/TypeScript, Python, Go, and Java.
Bitcoin Cash transaction fees are paid in BCH and are calculated per byte of transaction data. Fees are used to incentivize miners to include transactions in blocks.
You can find a full list of supported JSON-RPC methods on the Bitcoin Cash API Overview page.
If you have any questions or feedback, please contact us at [email protected] or open a ticket in the Alchemy Dashboard.