bb_sendTransaction - Bitcoin Cash
Example code for the bb_sendTransaction JSON-RPC method. Complete guide on how to use the bb_sendTransaction JSON-RPC method in the GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/api/v2/sendtx/' \
--header 'Content-Type: text/plain' \
--data-raw '01000000000101e17e03d21d051aa2bd9d336c3ac0693cfa92ce71592ceec521b1c48019ff77a10100000017160014...signed...raw...tx...hex...00000000'curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "bb_sendTransaction",
"params": [
"01000000000101e17e03d21d051aa2bd9d336c3ac0693cfa92ce71592ceec521b1c48019ff77a10100000017160014...signed...raw...tx...hex...00000000"
],
"id": "getblock.io"
}'const response = await fetch(
'https://go.getblock.io/<ACCESS-TOKEN>/api/v2/sendtx/',
{
method: 'POST',
headers: { 'Content-Type': 'text/plain' },
body: '01000000000101e17e03d21d051aa2bd9d336c3ac0693cfa92ce71592ceec521b1c48019ff77a10100000017160014...signed...raw...tx...hex...00000000'
}
);
console.log(await response.json());Response
{
"result": "10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642"
}Response Parameters
Field
Type
Description
Use Cases
Error Handling
Error Code
Message
Description
Was this helpful?