Skip to content

simulaterawtransaction JSON-RPC command

simulaterawtransaction ["hexstring",...] ( {"include_watchonly":bool} )

Calculate the balance change resulting in the signing and broadcasting of the given transaction(s).

Arguments

1. rawtxs                            (json array, required) An array of hex strings of raw transactions.
     [
       "hexstring",                  (string) Transaction hex
       ...
     ]
2. options                           (json object, optional) Options
     {
       "include_watchonly": bool,    (boolean, optional, default=false) Whether to include watch-only addresses (see RPC importaddress)
     }

Result

{
  "balance_change":     (numeric) The wallet balance change (negative means decrease).
}

Examples

> bitcoin-cli simulaterawtransaction ["myhex"]
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "simulaterawtransaction", "params": [["myhex"]] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

Bitcoin Cash Node Daemon version v29.1.1-7b53312

Documentation on docs.bitcoincashnode.org reflects the current master branch in Git, and may include API changes that are not yet present in the latest release.