sendrawtransaction

Send a raw transaction to the network and local node that is serialized and hex-encoded.

Because nodes typically won't rebroadcast non-wallet transactions that are already in their mempool, utilizing this for manual rebroadcasting may compromise privacy by disclosing the transaction's origin. Keep in mind that the transaction will be delivered unconditionally to all peers.

Example Request and Result for sendrawtransaction method

In this section, we provide an illustrative example of a request made to retrieve details contents using the sendrawtransaction method. Additionally, we present the resulting response containing information about sending a raw transaction to the network.

Parameters

FieldTypeDescription

hexstring*

array<string>

The hex string of the raw transaction

maxfeerate

numeric/string

Reject transactions whose fee rate is higher than the specified value, expressed in BTC/kB.

The example in this section uses a non-existing project id.

Make sure you replace it with your Bitcoin mainnet or Bitcoin Testnet endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Send a raw transaction to the network and local node

POST https://bitcoin-mainnet.blastapi.io/<project-id>

Request Body

NameTypeDescription

jsonrpc*

string

1.0

id*

string

bwarelabs

method*

string

sendrawtransaction

params*

string

["hexstring"]

The transaction hash in hex format

Curl Request example

curl --location 'https://bitcoin-mainnet.blastapi.io/<project-id>' \
--header 'content-type: application/json;' \
--data '{
    "jsonrpc": "1.0",
    "id": "bwarelabs",
    "method": "sendrawtransaction",
    "params": ["hexstring"]
}'

Last updated