Bitcoin

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

NetworkInterfaceEndpoint
MainnetJSON-RPChttps://bitcoin-mainnet.gateway.tatum.io
MainnetREST APIhttps://bitcoin-mainnet.gateway.tatum.io/rest
MainnetElectrs JSON-RPChttps://bitcoin-mainnet-electrs.gateway.tatum.io
TestnetJSON-RPChttps://bitcoin-testnet.gateway.tatum.io
TestnetREST APIhttps://bitcoin-testnet.gateway.tatum.io/rest
Testnet4JSON-RPChttps://bitcoin-testnet4.gateway.tatum.io
Testnet4REST APIhttps://bitcoin-testnet4.gateway.tatum.io/rest
SignetJSON-RPChttps://bitcoin-signet.gateway.tatum.io

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.

Get API keyFor free. No commitment.

Bitcoin RPC at a glance

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_pos
  • mempool.* (2): mempool.count, mempool.get_fee_histogram
  • server.* (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

Testing without an API key? Free public endpoints are listed on Bitcoin RPC at FREERPC.com.