Broadcasting Your Transaction

How to broadcast a signed Bitcoin transaction to the network — from your node to the mempool and into a block.

0steps ·

Progress 0/0

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.spacePOST /api/tx with the raw hex as the body
  • blockstream.infoPOST /api/tx
  • Electrum servers — via the blockchain.transaction.broadcast method

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:

ErrorMeaning
missing-inputsReferenced UTXO doesn’t exist or is already spent
bad-txns-inputs-missingorspentDouble-spend attempt
insufficient feeFee rate below minimum relay threshold
non-mandatory-script-verify-flagInvalid signature

Step 2: Network Propagation

Once validated, your node broadcasts the transaction to its peers using the gossip protocol:

  1. Your node sends an inv (inventory) message listing the new txid
  2. Peers that haven’t seen this txid request it with getdata
  3. Your node responds with the full transaction (tx message)
  4. 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:

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.