createrawtransaction

Creates a transaction spending the given inputs and creating new outputs. Outputs can be addresses or data. Returns hex-encoded raw transaction. Note that the transaction’s inputs are not signed, and it is not stored in the wallet or transmitted to the network.

Path Parameters

apiKeystringRequiredDefaults to docs-demo

Request

This endpoint expects an object.
inputslist of objectsRequired
An array of transaction inputs.
outputslist of maps from strings to doubles or strings or map from strings to doubles or stringsRequired

An array or object with outputs (key-value pairs, where keys are addresses or ‘data’, and values are BTC amounts or hex).

locktimeintegerOptionalDefaults to 0

Raw locktime. Non-0 value also activates inputs.

replaceablebooleanOptionalDefaults to false
Whether to mark transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees.

Response

Hex-encoded raw transaction.