Basic Transaction Creation
The simplest way to send bitcoin is using thesend RPC command:
- 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:1
Create a raw transaction
Use
createrawtransaction to specify inputs and outputs manually:2
Fund the transaction
Use This returns a funded transaction hex and fee information.
fundrawtransaction to add inputs and change output:3
Sign the transaction
Use
signrawtransactionwithwallet to add signatures:4
Broadcast the transaction
Use Returns the transaction ID (txid) if successful.
sendrawtransaction to broadcast to the network:Creating Funded Transactions
Thewalletcreatefundedpsbt RPC combines creation and funding in one step:
Transaction Fee Estimation
Estimate appropriate fees usingestimatesmartfee:
Listing Unspent Outputs
View available UTXOs withlistunspent:
Watch-Only Wallets
Watch-only wallets can create unsigned transactions but cannot sign them:Transaction Replacement (RBF)
To enable Replace-By-Fee on a transaction, use thereplaceable option:
bumpfee:
Verifying Transactions
Check transaction status withgettransaction:
Common Options
Most transaction RPCs support these options:conf_target- Number of blocks for fee estimationestimate_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