Transactions

Broadcast a transaction (raw or PSBT)

Changed on

Broadcasts a raw transaction or a Partially Signed Bitcoin Transaction (PSBT) to the network for the specified cryptocurrency.

post/v1/cryptos/{cryptoCode}/transactions

Request

Path parameters

cryptoCodestring required

The cryptocurrency code to track (e.g., 'BTC' for Bitcoin, 'LTC' for Litecoin).

Query parameters

testMempoolAcceptboolean

If true, tests whether the transaction would be accepted into the mempool without broadcasting it.

Request body

hexstring

The raw transaction in hexadecimal format, or finalized PSBT in Base64 or hex.

Example request

{
  "hex": "0200000001..."
}

Response

Transaction processed successfully.

successboolean

Whether the transaction was successfully broadcast.

rpcCodeinteger

The RPC code returned by the node.

rpcCodeMessagestring

The error code message returned during transaction submission.

rpcMessagestring

The detailed RPC message returned by the node.

Example response

{
  "rpcCode": -25,
  "rpcCodeMessage": "General error during transaction submission",
  "rpcMessage": "bad-txns-inputs-missingorspent"
}

Changes

    • info

      api operation id BroadcastTransaction was added

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • breaking

      removed the required property from the response with the status

    • warning

      removed the request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status