Bitcoin is a proof-of-work Layer 1 blockchain that secures a UTXO-based ledger with SHA-256 mining and uses Bitcoin Script to define spending conditions.
Bitcoin uses the UTXO model: each transaction spends earlier outputs and creates new ones, and a wallet balance is the sum of its unspent outputs. Bitcoin Core nodes expose a JSON-RPC API for blocks, transactions, the mempool, fee estimation, and broadcasting raw transactions. Addresses start with 1 for legacy P2PKH, 3 for P2SH, bc1q for SegWit, and bc1p for Taproot, and fees are paid in BTC, quoted in satoshis per virtual byte.
Bitcoin RPC endpoints
| Network | Interface | Endpoint |
|---|---|---|
| Mainnet | JSON-RPC | https:/ |
| Mainnet | REST API | https:/ |
| Mainnet | Electrs JSON-RPC | https:/ |
| Testnet | JSON-RPC | https:/ |
| Testnet | REST API | https:/ |
| Testnet4 | JSON-RPC | https:/ |
| Testnet4 | REST API | https:/ |
| Signet | JSON-RPC | https:/ |
HTTP requests take your API key in the x-api-key header. See Authentication.
For example, this request sends getblockcount to Bitcoin Mainnet through the JSON-RPC interface:
curl 'https://bitcoin-mainnet.gateway.tatum.io' \
--header 'content-type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{"jsonrpc":"2.0","method":"getblockcount","params":[],"id":1}'Don't have an API key?
Sign up to Dashboard and create your API keys today. Get higher limits and use debugging tools.
Bitcoin RPC at a glance
- Networks: Mainnet (Tier 1), Testnet (Tier 2), Testnet4 (Tier 2) and Signet (Tier 2)
- Interfaces: JSON-RPC and REST
- Supported methods: 74 · JSON-RPC methods · REST API endpoints
- Native token:
BTC - Block explorers: Mainnet · Testnet · Testnet4 · Signet
- Network status: Mainnet · Testnet · Testnet4 · Signet
- Authentication: API key in the
x-api-keyheader, see Authentication
Try Bitcoin RPC
Get the latest Bitcoin block
Sends getblockcount to Bitcoin Mainnet through Tatum RPC Gateway and shows the latest block number.
Get the Bitcoin node version
Sends getblockchaininfo to Bitcoin Mainnet through Tatum RPC Gateway and shows the node version and status.
To try more Bitcoin methods, open the Bitcoin Postman collection, set the gateway-api-key variable of the Tatum Gateway environment to your API key, and send any request.
Bitcoin RPC methods
Methods each Bitcoin interface supports, listed live from Tatum RPC Gateway.
JSON-RPC
32 methods on Mainnet, Testnet, Testnet4 and Signet. What each one does: Bitcoin JSON-RPC methods.
createrawtransaction, decoderawtransaction, decodescript, estimatefee, estimatesmartfee, getbestblockhash, getblock, getblockchaininfo, getblockcount, getblockhash, getblockheader, getblockstats, getchaintips, getdifficulty, getmempoolancestors, getmempoolcluster, getmempooldescendants, getmempoolentry, getmempoolfeeratediagram, getmempoolinfo, getnetworkinfo, getrawmempool, getrawtransaction, gettxout, gettxoutproof, searchrawtransactions, sendrawtransaction, submitpackage, testmempoolaccept, validateaddress, verifymessage, verifytxoutproof
REST API
11 endpoints on Mainnet, Testnet and Testnet4. What each one does: Bitcoin REST API endpoints.
GET /block/{block-hash}, GET /block/notxdetails/{block-hash}, GET /blockhashbyheight/{height}, GET /chaininfo.json, GET /getutxos/{outpoint}/{outpoint}/.../{outpoint}, GET /getutxos/checkmempool/{outpoint}/{outpoint}/.../{outpoint}, GET /headers/{block-hash}, GET /headers/{count}/{block-hash}, GET /mempool/contents.json, GET /mempool/info.json, GET /tx/{tx-hash}
Electrs JSON-RPC
31 methods on Mainnet. What each one does: Bitcoin JSON-RPC methods.
blockchain.*(24):blockchain.address.decode,blockchain.address.get_balance,blockchain.address.get_history,blockchain.address.get_mempool,blockchain.address.listunspent,blockchain.address.subscribe,blockchain.address.unsubscribe,blockchain.block.get,blockchain.block.header,blockchain.block.headers,blockchain.estimatefee,blockchain.headers.subscribe,blockchain.headers.tip,blockchain.relayfee,blockchain.scripthash.get_balance,blockchain.scripthash.get_history,blockchain.scripthash.get_mempool,blockchain.scripthash.listunspent,blockchain.scripthash.subscribe,blockchain.scripthash.unsubscribe,blockchain.transaction.broadcast,blockchain.transaction.get,blockchain.transaction.get_merkle,blockchain.transaction.id_from_posmempool.*(2):mempool.count,mempool.get_fee_histogramserver.*(5):server.banner,server.donation_address,server.features,server.ping,server.version
Every endpoint also lists its methods at runtime: /_methods (JSON) and /llms.txt (text), for example Bitcoin Mainnet /_methods.
Method unavailable?If you need a method we don't support yet, contact support.
Related
- Bitcoin RPC nodes on tatum.io: plans, pricing and dedicated nodes
- Supported Blockchains: every chain on Tatum RPC Gateway and its network tiers
- Bitcoin official website: chain documentation
Testing without an API key? Free public endpoints are listed on Bitcoin RPC at FREERPC.com.