Luganodes RPC is live. Built for enterprise, open to every builderLIVE

Research

7 min read

Bitcoin RPC, Step by Step: From Deposit to Withdrawal

The Bitcoin Core RPC calls behind each step of a payment

Bitcoin RPC, Step by Step: From Deposit to Withdrawal

Published on

November 19, 2026

Introduction

Bitcoin is still the asset the rest of crypto settles around. US spot ETFs alone hold more than 1.2 million BTC, and every exchange, custodian and wallet that touches those coins needs a reliable way to watch the chain and move funds.

That way is a Bitcoin RPC endpoint. It is an HTTPS URL that accepts Bitcoin Core JSON-RPC calls, the same interface bitcoind exposes when you run a node yourself. Your app sends a request such as getblockcount or sendrawtransaction, and the node answers.

This guide follows a Bitcoin payment from start to finish and shows which RPC call handles each step.

First, Bitcoin thinks in coins, not accounts

Bitcoin has no account balances. Instead, it tracks unspent transaction outputs (UTXOs), which you can think of as individual coins of different sizes. A wallet's balance is simply the total of the coins it controls.

Bitcoin Core also doesn't keep a lookup table by address, so there is no single call that returns the balance of any address. Instead, apps watch new blocks for the addresses they care about and keep their own record. Every step below is built around that pattern.

The life of a Bitcoin payment, in six RPC calls

1. Spot the deposit

Poll getblockcount or getbestblockhash to see when a new block arrives, then read it with getblock. To save work, getblockfilter returns a compact filter that tells you whether a block might involve your addresses, so you can skip blocks that don't.

2. Wait for confirmations

A transaction gets harder to reverse with every block added on top of it. Since Bitcoin Core 28, nodes treat any unconfirmed transaction as replaceable by default, so a zero-confirmation payment is never safe to credit. Most major exchanges credit BTC deposits after two or three confirmations, and many wait longer for large amounts.

3. Look up and verify

getrawtransaction returns the full details of any transaction on the chain. gettxout tells you whether a specific coin is still unspent, which is the quickest way to confirm that funds are really available.

4. Build the withdrawal

Partially Signed Bitcoin Transactions (PSBTs) are the standard format for building a transaction in one place and signing it in another. Create one with createpsbt, sign it on your own hardware wallet, multisig setup or custody system, then complete it with finalizepsbt. Your private keys never touch the endpoint.

5. Set the fee

estimatesmartfee returns a fee rate likely to confirm within your target number of blocks. Bitcoin fees can rise sharply within hours when demand spikes, as they did around the April 2024 halving, so estimate fees at send time rather than using a fixed fee.

6. Broadcast and track

Send the signed transaction with sendrawtransaction, then follow it in the mempool with getmempoolentry. If an output gets spent in a way you didn't expect, gettxspendingprevout shows which transaction spent it.

Free to watch, Growth to build

Bitcoin is the lowest-cost chain on Luganodes RPC. A standard call costs 5 compute units (CUs), so the free tier's 25 million CUs a month covers about 5 million calls, with no card required. It is hard-capped, so traffic pauses at the limit instead of turning into a surprise bill.

The tiers follow the payment flow above:

  • Free covers watching and broadcasting: reading blocks, compact filters, mempool tracking and sendrawtransaction.
  • Growth and Pro add the tools for building and verifying transactions: PSBTs, getrawtransaction, gettxout and estimatesmartfee.

Custom Enterprise plans are available for exchanges and custodians that need dedicated capacity.

Every node runs with a full transaction index (txindex) enabled, so getrawtransaction works for any transaction in Bitcoin's history. The nodes run on owned bare-metal hardware, monitored 24/7 by an in-house SRE team. One API key covers Bitcoin, Ethereum and Tron, so a multi-chain wallet or exchange manages a single integration.

Make your first Bitcoin RPC call

Create an app at rpc.luganodes.com, copy your Bitcoin endpoint and check the current block height:

cURL
curl https://bitcoin-mainnet.rpc.luganodes.com/v1/YOUR_API_KEY \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"getblockcount","params":[],"id":1}'

Luganodes Bitcoin RPC runs on the same infrastructure that secures more than $2B in stake across 40+ networks. Full docs are at docs.luganodes.com/rpc, and you can send questions to rpc-support@luganodes.com.

Get your free Bitcoin RPC endpoint

Frequently Asked Questions

Is there a free Bitcoin RPC endpoint?

Yes. Luganodes offers a free tier with 25 million compute units a month, with no credit card required. Your endpoint URL looks like https://bitcoin-mainnet.rpc.luganodes.com/v1/<API_KEY>, and it works with any HTTP client or Bitcoin RPC library.

Why does getrawtransaction return "No such mempool or blockchain transaction"?

Usually because the node doesn't have a transaction index. Without txindex, Bitcoin Core can only find transactions in the mempool or in its own wallet. Luganodes nodes run with txindex enabled, so getrawtransaction can return any confirmed transaction (available on Growth and above).

How do I check a Bitcoin address balance over RPC?

Bitcoin Core has no address index, so no single RPC call returns the balance of any address. Instead, watch new blocks for the addresses you care about and keep a running record of their unspent coins. getblockfilter helps by flagging which blocks are worth checking.

How many confirmations should I wait for?

It depends on the amount. Most major exchanges credit BTC deposits after two or three confirmations, and larger payments often wait longer. Never credit a zero-confirmation payment, because Bitcoin Core treats unconfirmed transactions as replaceable.

Why does sendrawtransaction fail with "min relay fee not met"?

The transaction's fee rate is below the minimum the node will relay, or one of its outputs is too small to be worth spending (known as "dust"). Check the current rate with estimatesmartfee, rebuild the transaction with a higher fee, and broadcast it again.

What is the difference between bitcoind RPC and a hosted Bitcoin RPC endpoint?

They use the same Bitcoin Core JSON-RPC interface. Running bitcoind yourself means managing storage, syncing and upgrades. A hosted endpoint gives you the same calls over HTTPS with an API key, with the infrastructure handled for you.

About Luganodes

Luganodes is a world-class, non-custodial blockchain infrastructure provider that has rapidly gained recognition in the industry for offering institutional-grade services. It was born out of the Lugano Plan B Program, an initiative driven by Tether and the City of Lugano. Luganodes maintains an exceptional 99.9% uptime with round-the-clock monitoring by SRE experts. With support for 40+ PoS networks and serving 60+ institutional clients, it ranks among the top validators on Polygon, Polkadot, Sui, and Tron. Luganodes prioritizes security and compliance, holding the distinction of being one of the first staking providers to adhere to all SOC 2 Type II, GDPR, and ISO 27001 standards as well as offering Chainproof insurance to institutional clients.

The information herein is for general informational purposes only and does not constitute legal, business, tax, professional, financial, or investment advice. No warranties are made regarding its accuracy, correctness, completeness, or reliability. Luganodes and its affiliates disclaim all liability for any losses or damages arising from reliance on this information. Luganodes is not obligated to update or amend any content. Use at your own risk. For specific guidance, please consult a qualified professional.