Bitcoin RPC (BTC)
Free public endpoints
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.
Connect to Bitcoin
Free endpoints for every network below. Tatum Premium covers production traffic.
Connect to Bitcoin Gateway
Make your first RPC call on Bitcoin's Blockchain Gateway.
Testnet
TestnetTestnet4
TestnetSignet
Testnet* Rate limit 5 requests per minute, enough for testing and development. Need more? Get a free API key for a higher limit, or upgrade for production.
Get 200 requests/second, priority support and advanced blockchain features.
Global Load Balancer
Route to nearest node
Batch RPC Calls
Multiple requests at once
Archive Nodes
Historical blockchain data
Debug & Trace
Advanced debugging
Advanced Analytics
Usage & performance
Bring Your Own RPC
Custom RPC gateways
Increase your limit and access all network features in Tatum Development Platform.
Testnet Faucets for Bitcoin
Get free testnet tokens for development on Bitcoin.
Estimate Gas on Bitcoin
Calculate the optimal gas fee for any transaction on Bitcoin.
No signup. No paywalls. Just RPC that works. Great ideas come from everywhere.
With love by Tatum
Bitcoin methods
Every method the Bitcoin gateway accepts, grouped by interface. 74 in total, read live from the node rather than kept by hand.
Mainnet is the live Bitcoin network. Every transaction it
accepts is final, and every BTC balance it
reports is real money.
Bitcoin runs 3 test networks here, Testnet, Testnet4 and Signet. All of them answer the same methods as Mainnet, so pick whichever your tooling already targets and switch the URL when you go live.
Bitcoin answers over 3 interfaces: JSON-RPC, Electrs JSON-RPC and REST. Each is listed once below with every method it accepts. The endpoints differ per network, and all of them are in the gateway list above.
What sits between you and Bitcoin
A node is a machine running Bitcoin with a copy of the chain. Your code cannot ask the chain directly, it asks a node. The gateway picks a healthy one for every call, so you point at one URL instead of one machine.
- One URL, nothing to run or keep patched yourself.
- Calls routed to a node that is up and in sync.
- A failing node is skipped rather than returned to you as an error.
JSON-RPC
32 methodsThe default. Every wallet, library and framework speaks it, and it is what you want unless you specifically need something else.
One POST carries a method name, its parameters and an id, and the response comes back on the same connection carrying that same id. Requests are independent, so there is no session to keep alive and nothing to reconnect, which is why it runs unchanged behind a load balancer or inside a serverless function. Send an array instead of a single object and the node works through the whole batch in one round trip.
Where it fits
- Anything your client library already does for you. Libraries and SDKs for the chain target this.
- Batching reads. One array of twenty calls costs one round trip instead of twenty.
- Stateless and serverless deployments, because nothing has to stay connected between calls.
- Historical queries, by asking for an earlier block or slot where you would otherwise ask for the latest.
Trade-offs
- It cannot push. Finding out that a block landed means polling for it, or moving to WebSocket.
- Wide log queries get refused. Page through in fixed block windows and merge the results yourself.
- Batch responses may come back in any order. Match them on id, never on position.
Enabled and tested methods
Read live from the endpoint, so this is what it actually serves today rather than what the protocol allows in principle. Anything not on this list returns a method-not-found error.
- createrawtransaction
- Builds an unsigned raw transaction from a set of inputs and outputs.
- decoderawtransaction
- Decodes a serialized transaction into readable JSON.
- decodescript
- Decodes a hex script into its assembly form and any addresses it implies.
- estimatefee
- Estimates the fee per kilobyte for confirmation within a number of blocks.
- estimatesmartfee
- Estimates the fee rate needed for confirmation within a target number of blocks.
- getbestblockhash
- Returns the hash of the current chain tip.
- getblock
- Returns a block by hash, either as a summary or with full transaction detail.
- getblockchaininfo
- Returns chain state: height, difficulty, verification progress and active soft forks.
- getblockcount
- Returns the height of the chain tip.
- getblockhash
- Returns the block hash at a given height.
- getblockheader
- Returns a block header without its transactions.
- getblockstats
- Returns per-block statistics such as fee rates, size and transaction counts.
- getchaintips
- Lists known chain tips, including stale and orphaned branches.
- getdifficulty
- Returns the current proof-of-work difficulty.
- getmempoolancestors
- Lists the unconfirmed ancestors of a transaction in the mempool.
- getmempoolcluster
- Returns the cluster of related transactions a mempool entry belongs to.
- getmempooldescendants
- Lists the unconfirmed descendants of a transaction in the mempool.
- getmempoolentry
- Returns mempool details for one transaction, including fees and dependencies.
- getmempoolfeeratediagram
- Returns the fee-rate distribution of the current mempool.
- getmempoolinfo
- Returns mempool size, memory usage and the minimum relay fee.
- getnetworkinfo
- Returns node version, protocol version and connection details.
- getrawmempool
- Lists the transaction IDs currently sitting in the mempool.
- getrawtransaction
- Returns a transaction, either serialized or decoded.
- gettxout
- Returns an unspent transaction output (UTXO), if it is still unspent.
- gettxoutproof
- Returns a Merkle proof that given transactions are included in a block.
- searchrawtransactions
- Returns transactions involving a given address.
- sendrawtransaction
- Broadcasts a signed, serialized transaction to the network.
- submitpackage
- Submits a package of related raw transactions, such as a child with its parents, to the mempool and relays it.
- testmempoolaccept
- Checks whether a transaction would be accepted into the mempool, without broadcasting it.
- validateaddress
- Checks whether an address is well formed and returns what is known about it.
- verifymessage
- Verifies a message signed by the private key behind an address.
- verifytxoutproof
- Verifies a Merkle proof and returns the transactions it commits to.
Common JSON-RPC errors
What you are most likely to hit calling this interface, and what to do about it.
- -32700
- Parse error. The request body was not valid JSON. Check that the body is serialised JSON and that Content-Type is application/json.
- -32600
- Invalid request. The JSON parsed, but it is not a well-formed JSON-RPC call. Include jsonrpc, method and id fields. A batch must be a non-empty array.
- -32601
- Method not found. This node does not expose the method you called. Check the spelling and the namespace, and confirm the method is in the list above for this network. Tracing methods in particular are not enabled everywhere.
- -32602
- Invalid params. The method exists but the arguments are wrong. Check argument order and types. Most EVM methods want hex-encoded quantities, and a block parameter such as latest or a hex height.
- -32603
- Internal error. The node failed while handling an otherwise valid request. Retry with backoff. If it persists on one method, it is usually that method rather than the node.
- -32000
- Server error. A catch-all the node uses for execution failures, most often a reverted call or a request over a limit. Read the accompanying message. Execution reverted means your call failed on chain, not in transport. Narrow the block range if you are querying logs.
- HTTP 429
- Rate limited. You have exceeded the free tier request allowance. Back off and retry, batch reads into single calls, or move to a dedicated endpoint for production traffic.
- HTTP 413
- Payload too large. The request body exceeded what the node accepts. Split large batches into smaller ones.
Electrs JSON-RPC
31 methodsEnabled and tested methods
Read live from the endpoint, so this is what it actually serves today rather than what the protocol allows in principle. Anything not on this list returns a method-not-found error.
- blockchain.address.decode
- Decodes an address to its raw payload and type.
- blockchain.address.get_balance
- Returns the confirmed and unconfirmed balance of an address.
- blockchain.address.get_history
- Lists the confirmed and mempool transactions involving an address.
- blockchain.address.get_mempool
- Lists the unconfirmed transactions involving an address.
- blockchain.address.listunspent
- Lists the unspent outputs held by an address.
- blockchain.address.subscribe
- Subscribes to an address and sends a notification whenever its history changes.
- blockchain.address.unsubscribe
- Cancels an address subscription.
- blockchain.block.get
- Returns a full raw block by hash or height.
- blockchain.block.header
- Returns the raw block header at a height, optionally with a Merkle proof to a checkpoint.
- blockchain.block.headers
- Returns a run of consecutive raw block headers starting at a height.
- blockchain.estimatefee
- Estimates the fee per kilobyte needed for confirmation within a number of blocks.
- blockchain.headers.subscribe
- Returns the chain tip header and sends a notification for every new one.
- blockchain.headers.tip
- Returns the chain tip header and height, without subscribing.
- blockchain.relayfee
- Returns the minimum fee a transaction needs to be relayed.
- blockchain.scripthash.get_balance
- Returns the confirmed and unconfirmed balance of a script hash.
- blockchain.scripthash.get_history
- Lists the confirmed and mempool transactions involving a script hash.
- blockchain.scripthash.get_mempool
- Lists the unconfirmed transactions involving a script hash.
- blockchain.scripthash.listunspent
- Lists the unspent outputs locked to a script hash.
- blockchain.scripthash.subscribe
- Subscribes to a script hash and sends a notification whenever its history changes.
- blockchain.scripthash.unsubscribe
- Cancels a script hash subscription.
- blockchain.transaction.broadcast
- Broadcasts a signed raw transaction to the network.
- blockchain.transaction.get
- Returns a transaction by hash, raw or decoded.
- blockchain.transaction.get_merkle
- Returns the Merkle branch proving a transaction is in a block.
- blockchain.transaction.id_from_pos
- Returns the hash of the transaction at a position in a block, optionally with its Merkle branch.
- mempool.count
- Returns how many transactions are in the mempool.
- mempool.get_fee_histogram
- Returns the mempool fee-rate distribution as fee and size pairs.
- server.banner
- Returns the server welcome banner.
- server.donation_address
- Returns the donation address of the server operator.
- server.features
- Returns the server features: genesis hash, hash function, version and supported protocol range.
- server.ping
- Checks the connection is alive.
- server.version
- Negotiates the protocol version and identifies the client and server software.
Common Electrs JSON-RPC errors
What you are most likely to hit calling this interface, and what to do about it.
- -32700
- Parse error. The request body was not valid JSON. Check that the body is serialised JSON and that Content-Type is application/json.
- -32600
- Invalid request. The JSON parsed, but it is not a well-formed JSON-RPC call. Include jsonrpc, method and id fields. A batch must be a non-empty array.
- -32601
- Method not found. This node does not expose the method you called. Check the spelling and the namespace, and confirm the method is in the list above for this network. Tracing methods in particular are not enabled everywhere.
- -32602
- Invalid params. The method exists but the arguments are wrong. Check argument order and types. Most EVM methods want hex-encoded quantities, and a block parameter such as latest or a hex height.
- -32603
- Internal error. The node failed while handling an otherwise valid request. Retry with backoff. If it persists on one method, it is usually that method rather than the node.
- -32000
- Server error. A catch-all the node uses for execution failures, most often a reverted call or a request over a limit. Read the accompanying message. Execution reverted means your call failed on chain, not in transport. Narrow the block range if you are querying logs.
- HTTP 429
- Rate limited. You have exceeded the free tier request allowance. Back off and retry, batch reads into single calls, or move to a dedicated endpoint for production traffic.
- HTTP 413
- Payload too large. The request body exceeded what the node accepts. Split large batches into smaller ones.
REST
11 methodsEvery resource has its own URL, so a request is just an address you can open.
Paste it into a browser, curl it, or bookmark it. There is no body to construct and no method name to look up, and because a read is a plain GET, ordinary HTTP caching applies at the CDN and in your own client. Responses are JSON, and the path itself usually tells you what you are getting.
Where it fits
- Getting oriented on an unfamiliar chain without writing any code first.
- Caching, because a GET can be cached by anything sitting between you and the node.
- Debugging, since the request that failed is a URL you can paste to a colleague.
Trade-offs
- You get exactly what the endpoint returns. There is no way to ask for less, or for more.
- Building a full picture takes several round trips where one batched JSON-RPC call would do.
- Paths carry version prefixes and shift between node releases more readily than method names do.
Enabled and tested methods
Read live from the endpoint, so this is what it actually serves today rather than what the protocol allows in principle. Anything not on this list returns a method-not-found error.
- GET /block/{block-hash}
- Returns a block, including its transactions.
- GET /block/notxdetails/{block-hash}
- Returns a block without its transaction details.
- GET /blockhashbyheight/{height}
- Returns the block hash at a given height.
- GET /chaininfo.json
- Returns chain state: height, difficulty, verification progress and soft forks.
- GET /getutxos/{outpoint}/{outpoint}/.../{outpoint}
- Returns the unspent outputs for a list of outpoints, confirmed only.
- GET /getutxos/checkmempool/{outpoint}/{outpoint}/.../{outpoint}
- Returns the unspent outputs for a list of outpoints, counting the mempool.
- GET /headers/{block-hash}
- Returns block headers starting at a given hash.
- GET /headers/{count}/{block-hash}
- Returns a set number of block headers starting at a given hash.
- GET /mempool/contents.json
- Returns the full contents of the mempool.
- GET /mempool/info.json
- Returns mempool size, memory usage and minimum relay fee.
- GET /tx/{tx-hash}
- Returns a transaction by its hash.
Common REST errors
What you are most likely to hit calling this interface, and what to do about it.
- 400
- Bad request. A path or query parameter is malformed. Check the parameter format, and that path values are URL-encoded.
- 404
- Not found. Either the path is wrong, or the resource genuinely does not exist at that height. Confirm the path against the list above. A valid path can still 404 for pruned history on a non-archive node.
- 429
- Rate limited. You have exceeded the free tier request allowance. Back off and retry. REST responses cache well, so caching on your side removes most repeat traffic.
- 500
- Internal server error. The node failed while handling the request. Retry with backoff.
- 503
- Service unavailable. The node is starting, resyncing, or temporarily out of rotation. Retry with backoff; this is normally short-lived.
Indexed Bitcoin Data Insights
Complete on-chain data access, no infrastructure to run yourself. Query wallets, tokens, NFTs, and transaction history through one API.
Get Wallet Portfolio
Fetch all token balances for a wallet on Bitcoin.
Get Token Exchange Rates
Check exchange rates for tokens and fiat on Bitcoin.
Check Bitcoin Malicious Address
Verify if an address on Bitcoin is flagged as malicious.
Get Bitcoin Wallet Transactions
Retrieve all Bitcoin transactions for a wallet, including internal transfers.
Get UTXOs for a Wallet Address
Fetch all UTXOs for a wallet address on Bitcoin.
Real-time Bitcoin Alerts
Webhooks for on-chain events. Get an alert when a transaction or wallet activity matches, instead of polling the network.
Real-time Alerts for Bitcoin
Receive instant webhooks for any event on Bitcoin.
Notification Types on Bitcoin
Discover incoming and outgoing transaction events for Bitcoin addresses.
About Bitcoin
What it is, and guides for building on it.
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.
From the Tatum blog
What Is eCash (ECX)? Why Bitcoin Holders Received It
eCash (ECX) is a Bitcoin hard fork at block 973,728. Holders received 1 ECX per BTC. What it is, where it trades, whi...
What's new
Data API: Bitcoin (BTC) Indexer - performance upgrade
We’ve rolled out a major enhancement to our Bitcoin UTXO Indexer, delivering huge performance gains especially for la...
Bitcoin (new RPC): Signet testnet
We’re expanding our Bitcoin support with the addition of Bitcoin Signet, the latest Bitcoin test network designed for...
Bitcoin Testnet4 (new RPC)
🚀 Get Started | Documentation | Status Page | Block Explorer We’re excited to announce the launch of Bitcoin Testnet...
Bitcoin Lightning vs On-Chain Payments for Businesses
Compare Bitcoin Lightning vs on-chain payments for businesses. Speed, fees, privacy, security, and the infrastructure...
Can AI Break Bitcoin? What an Exposed Public Key Means
No public attack recovers Bitcoin or Ethereum keys from this week’s AI math drop. How likely Drake’s ECDSA warning is...
Bitcoin Data API Just Got (a lot) Faster
We rebuilt the engine behind our BTC Data API. UTXO lookups, address balances, and transaction history calls now perf...
Frequently Asked Questions
Everything you need to know about Bitcoin RPC endpoints
Quick Answer: What is Bitcoin RPC?
RPC (Remote Procedure Call) is the standard way to interact with the network programmatically: reading on-chain data and submitting transactions through the chain's RPC methods. The free tier allows 5 requests per minute with no registration required, which covers most learning and testing workflows. Production applications typically move to Tatum Premium for 200 requests per second.
What is Bitcoin RPC?
How do I connect to Bitcoin using these RPC endpoints?
What are the rate limits for the free RPC tier?
Is Bitcoin RPC free forever?
What happens if I exceed the free tier rate limit?
Are these RPC endpoints secure?
What's the difference between mainnet and testnet RPC endpoints?
How do I troubleshoot RPC connection errors?
Can I use these endpoints in production?
Explore Other Blockchains
Discover RPC endpoints for other popular blockchain networks