sendrawtransaction

sendrawtransaction "hexstring" ( maxfeerate )

Submits a raw transaction (serialized and hex-encoded) to the local node and the network.

Note that the transaction will be broadcast to all peers unconditionally. Using this for manual rebroadcast can reduce privacy by revealing the origin of the transaction, as nodes usually do not rebroadcast non-wallet transactions that are already in their mempool.

Also, refer to the createrawtransaction and signrawtransactionwithkey calls.

Argument #1 – hexstring

Type: string, required

The hex string of the raw transaction

Argument #2 – maxfeerate

Type: numeric or string, optional, default=0.10

Fee Rate:

Rejects transactions with a fee rate higher than the specified value, expressed in BTCE/kB. Set to 0 to accept any fee rate.

Result

Name

Type

Description

hex

string

The transaction hash in hex

Examples

Create a transaction:

bitcoinevo-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"

Sign the transaction, and get back the hex:

bitcoinevo-cli signrawtransactionwithwallet "myhex"

Send the transaction (signed hex):

bitcoinevo-cli sendrawtransaction "signedhex"

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "sendrawtransaction", "params": ["signedhex"]}' -H 'content-type: text/plain;' http://127.0.0.1:7332/