submitpackage (hidden command)

Bitcoin Core 24.1 RPC

submitpackage ["rawtx",...]

Submit a package of raw transactions (serialized, hex-encoded) to local node (-regtest only).

The package will be validated according to consensus and mempool policy rules. If all transactions pass, they will be accepted to mempool.

This RPC is experimental and the interface may be unstable. Refer to doc/policy/ for documentation on package policies.

Warning: until package relay is in use, successful submission does not mean the transaction will propagate to other nodes on the network.

Currently, each transaction is broadcasted individually after submission, which means they must meet other nodes' feerate requirements alone.


1. package         (json array, required) An array of raw transactions.
       "rawtx",    (string)


{                                (json object)
  "tx-results" : {               (json object) transaction results keyed by wtxid
    "wtxid" : {                  (json object) transaction wtxid
      "txid" : "hex",            (string) The transaction hash in hex
      "other-wtxid" : "hex",     (string, optional) The wtxid of a different transaction with the same txid but different witness found in the mempool. This means the submitted transaction was ignored.
      "vsize" : n,               (numeric) Virtual transaction size as defined in BIP 141.
      "fees" : {                 (json object) Transaction fees
        "base" : n               (numeric) transaction fee in BTC
  "package-feerate" : n,         (numeric, optional) package feerate used for feerate checks in BTC per KvB. Excludes transactions which were deduplicated or accepted individually.
  "replaced-transactions" : [    (json array, optional) List of txids of replaced transactions
    "hex",                       (string) The transaction id


> bitcoin-cli testmempoolaccept [rawtx1, rawtx2]
> bitcoin-cli submitpackage [rawtx1, rawtx2]