Skip to main content

Creating Raw Transactions

If you need absolute control of the transactions, you can create your own & broadcast transaction without using sendtoaddress or sendmany

Make Transaction:#

createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,"data":"hex",...} (locktime)

createrawtransaction documentation

Returns the value of raw transaction in string (encoded as hex).

Before broadcasting you need to sign the transaction first to validate that you own input's private key

Sign Transaction:#

signrawtransaction <raw-transaction-hex> ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )

signrawtransaction documentation

Returns the value of raw signed transaction which can be used to broadcast it into network.

Broadcast Transaction:#

sendrawtransaction <raw-signed-transaction-hex> (allowhighfees instantsend bypasslimits)

signrawtransaction documentation

Returns the txid of your transaction which can be now tracked in explorer or in wallet itself.