Broadcasting Your Transaction
How to broadcast a signed Bitcoin transaction to the network — from your node to the mempool and into a block.
0steps ·
What You’ll Learn
- How to submit a raw transaction to the Bitcoin network
- What happens during transaction propagation
- How transactions move from the mempool into a confirmed block
Sending the Raw Transaction
You have a fully signed transaction in hex format. Now you need to get it to the network. There are several ways to broadcast:
Bitcoin Core CLI
If you run a full node, this is the most sovereign option:
bitcoin-cli sendrawtransaction "02000000000101..."
The command returns the txid if the transaction is accepted, or an error message explaining why it was rejected (invalid signature, insufficient fee, double-spend, etc.).
Programmatic RPC
Using JSON-RPC to your node:
curl --user rpcuser:rpcpass \
--data-binary '{"method":"sendrawtransaction","params":["02000000..."]}' \
http://127.0.0.1:8332/
Public APIs
If you don’t run a node, several services accept raw transactions:
- mempool.space —
POST /api/txwith the raw hex as the body - blockstream.info —
POST /api/tx - Electrum servers — via the
blockchain.transaction.broadcastmethod
Privacy note: Broadcasting through a third-party service reveals your IP address and transaction before it reaches the wider network. Running your own node avoids this.
What Happens After Broadcast
Step 1: Local Validation
Your node (or the API endpoint) validates the transaction before relaying it:
- Are all input UTXOs unspent?
- Do the signatures verify against the locking scripts?
- Is the fee above the minimum relay threshold (default: 1 sat/vB)?
- Is the transaction below the maximum standard size (400,000 WU)?
- Does it pass all standardness checks?
If any check fails, the transaction is rejected with a specific error code. Common errors:
| Error | Meaning |
|---|---|
missing-inputs | Referenced UTXO doesn’t exist or is already spent |
bad-txns-inputs-missingorspent | Double-spend attempt |
insufficient fee | Fee rate below minimum relay threshold |
non-mandatory-script-verify-flag | Invalid signature |
Step 2: Network Propagation
Once validated, your node broadcasts the transaction to its peers using the gossip protocol:
- Your node sends an
inv(inventory) message listing the new txid - Peers that haven’t seen this txid request it with
getdata - Your node responds with the full transaction (
txmessage) - Each receiving peer validates independently and repeats the process
A well-connected node reaches most of the network within 2-5 seconds.
Step 3: Mempool Entry
Every node that validates the transaction adds it to its local mempool — the waiting pool of unconfirmed transactions. The transaction stays here until a miner includes it in a block.
Mempool behavior varies by node:
- Default mempool size limit: 300 MB
- Default expiry: 336 hours (2 weeks)
- When the mempool is full, the lowest-fee-rate transactions are evicted
Step 4: Mining
Miners select transactions from their mempool to build a candidate block, prioritizing by fee rate (sat/vB). When a miner finds a valid proof-of-work, the block propagates across the network and your transaction achieves its first confirmation.
Average time to first confirmation: ~10 minutes, but this varies widely. If blocks are found quickly, it could be 1 minute. If your fee rate is too low during congestion, it could be hours or days.
Monitoring Your Transaction
After broadcasting, you can track the transaction:
# Check if it's in your node's mempool
bitcoin-cli getmempoolentry "txid"
# Get full transaction details
bitcoin-cli getrawtransaction "txid" true
Or use a block explorer like mempool.space or txid.uk to watch it in real time. You can also use tx.txid.uk to decode raw transactions and broadcast directly from your browser.
Transaction Stuck?
If your transaction is not confirming, you have options:
- RBF (Replace-By-Fee) — Replace the stuck transaction with a higher-fee version
- CPFP (Child Pays for Parent) — Create a child transaction that pays enough fee for both
- Re-broadcast — If the transaction was dropped from mempools, submit it again via tx.txid.uk
Read the full guide: How to Fix a Stuck Bitcoin Transaction
Next Step
Continue to Verifying and Exploring to confirm your transaction on the blockchain and learn what comes next.