sendrawtransaction
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
Field | Type | Description |
---|---|---|
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!
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"]
}'