/wallet/broadcasttransaction - Tron
Example code for the broadcasttransaction REST method. Complete guide on how to use broadcasttransaction REST method in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/wallet/broadcasttransaction' \
--header 'Content-Type: application/json' \
--data-raw '{
"txID": "d5ec749ecc2a615399d8a6c864ea4c74ff9f523c2be0e341ac9be5d47d7c2d62",
"raw_data": {
"contract": []
},
"raw_data_hex": "0a02...",
"signature": [
"a1b2c3...signature"
]
}'const response = await fetch(
'https://go.getblock.io/<ACCESS-TOKEN>/wallet/broadcasttransaction',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"txID": "d5ec749ecc2a615399d8a6c864ea4c74ff9f523c2be0e341ac9be5d47d7c2d62", "raw_data": {"contract": []}, "raw_data_hex": "0a02...", "signature": ["a1b2c3...signature"]})
}
);
console.log(await response.json());Response
Response Parameters
Field
Type
Description
Use Cases
Error Handling
HTTP Status
Message
Description
Was this helpful?