Skip to main content

/wallet/broadcasttransaction REST API Endpoint

Broadcast the signed transaction

Updated on
Oct 4, 2023

/wallet/broadcasttransaction REST API Endpoint

Body Parameters

txID
string
The transaction id
visible
boolean
It specifies whether the address should be visible in the TRON network or not. If it is true, the address will be visible in the network; otherwise, it will not be visible
raw_data
json
REQUIRED
The raw transaction data in protobuf format. It contain the transaction information, including the contract(s) to execute, the ref block hash and bytes, the expiration time, and the timestamp
raw_data_hex
string
REQUIRED
The raw transaction data in hexadecimal format. It contain the same information as raw_data, but in hexadecimal format
signature
array
The signature of the transaction. If a signature is provided, it should be the signature of the raw_data field

Returns

code
A string indicating the status of the transaction. Possible values include SUCCESS for a successful transaction, and various error codes for failed transactions. In this case, the value of code is SIGERROR, which indicates that the transaction failed because of a signature error
txid
The transaction id
message
The additional information about the error, if any
Request
1
curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/broadcasttransaction \
2
--header 'accept: application/json' \
3
--header 'content-type: application/json' \
4
--data '
5
{
6
"raw_data": "{\"contract\":[{\"parameter\":{\"value\":{\"amount\":1000,\"owner_address\":\"41608f8da72479edc7dd921e4c30bb7e7cddbe722e\",\"to_address\":\"41e9d79cc47518930bc322d9bf7cddd260a0260a8d\"},\"type_url\":\"type.googleapis.com/protocol.TransferContract\"},\"type\":\"TransferContract\"}],\"ref_block_bytes\":\"5e4b\",\"ref_block_hash\":\"47c9dc89341b300d\",\"expiration\":1591089627000,\"timestamp\":1591089567635}",
7
"raw_data_hex": "0a025e4b220847c9dc89341b300d40f8fed3a2a72e5a66080112620a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412310a1541608f8da72479edc7dd921e4c30bb7e7cddbe722e121541e9d79cc47518930bc322d9bf7cddd260a0260a8d18e8077093afd0a2a72e"
8
}
9
'
10
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free