Bitcoin Core provides several RPC commands for creating and sending transactions. This guide covers the most common workflows for both single-signature and watch-only wallets.
Basic Transaction Creation
The simplest way to send bitcoin is using the send RPC command:
bitcoin-cli send '{"address": 0.01}'
This command automatically:
Selects appropriate UTXOs
Calculates the transaction fee
Creates a change output
Signs and broadcasts the transaction
Manual Transaction Workflow
For more control over transaction creation, use the lower-level RPCs:
Create a raw transaction
Use createrawtransaction to specify inputs and outputs manually: bitcoin-cli createrawtransaction \
'[{"txid":"txid_here","vout":0}]' \
'{"receiving_address":0.01}'
Fund the transaction
Use fundrawtransaction to add inputs and change output: bitcoin-cli fundrawtransaction "raw_transaction_hex"
This returns a funded transaction hex and fee information.
Sign the transaction
Use signrawtransactionwithwallet to add signatures: bitcoin-cli signrawtransactionwithwallet "funded_transaction_hex"
Broadcast the transaction
Use sendrawtransaction to broadcast to the network: bitcoin-cli sendrawtransaction "signed_transaction_hex"
Returns the transaction ID (txid) if successful.
Creating Funded Transactions
The walletcreatefundedpsbt RPC combines creation and funding in one step:
bitcoin-cli walletcreatefundedpsbt \
'[]' \
'{"destination_address": 0.01}'
Leaving the inputs array empty allows Bitcoin Core to automatically select UTXOs.
Always verify transaction details before broadcasting. Check:
Recipient addresses are correct
Amounts are as intended
Fee is reasonable
Change address belongs to your wallet
Transaction Fee Estimation
Estimate appropriate fees using estimatesmartfee:
bitcoin-cli estimatesmartfee 6
This estimates the fee rate for confirmation within 6 blocks.
Listing Unspent Outputs
View available UTXOs with listunspent:
Filter by minimum confirmations:
bitcoin-cli listunspent 1 9999999 '["specific_address"]'
Watch-Only Wallets
Watch-only wallets can create unsigned transactions but cannot sign them:
bitcoin-cli -rpcwallet= "watch_only" send \
'{"destination": 0.01}'
This returns a PSBT that must be signed by a wallet with the private keys.
Never share your private keys or wallet.dat file. For enhanced security, consider using offline signing or hardware wallets for large amounts.
Transaction Replacement (RBF)
To enable Replace-By-Fee on a transaction, use the replaceable option:
bitcoin-cli -named send \
outputs='{"address":0.01}' \
options='{"replaceable":true}'
Replace an existing transaction with bumpfee:
bitcoin-cli bumpfee "original_txid"
Verifying Transactions
Check transaction status with gettransaction:
bitcoin-cli gettransaction "txid"
View mempool information:
bitcoin-cli getmempoolentry "txid"
Common Options
Most transaction RPCs support these options:
conf_target - Number of blocks for fee estimation
estimate_mode - Fee estimation mode (ECONOMICAL, CONSERVATIVE)
replaceable - Enable RBF (Replace-By-Fee)
subtractfeefromamount - Deduct fee from output amount
Next Steps
PSBT Learn about Partially Signed Bitcoin Transactions
Multi-signature Create multi-signature wallets and transactions