/walletsolidity/gettransactionbyid - Tron
Example code for the gettransactionbyid Solidity API method. Complete guide on how to use gettransactionbyid Solidity API method in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/walletsolidity/gettransactionbyid' \
--header 'Content-Type: application/json' \
--data-raw '{
"value": "d5ec749ecc2a615399d8a6c864ea4c74ff9f523c2be0e341ac9be5d47d7c2d62",
"visible": true
}'const response = await fetch(
'https://go.getblock.io/<ACCESS-TOKEN>/walletsolidity/gettransactionbyid',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"value": "d5ec749ecc2a615399d8a6c864ea4c74ff9f523c2be0e341ac9be5d47d7c2d62", "visible": true})
}
);
console.log(await response.json());import requests
response = requests.post(
'https://go.getblock.io/<ACCESS-TOKEN>/walletsolidity/gettransactionbyid',
headers={'Content-Type': 'application/json'},
json={"value": "d5ec749ecc2a615399d8a6c864ea4c74ff9f523c2be0e341ac9be5d47d7c2d62", "visible": true}
)
print(response.json())Response
{
"txID": "d5ec749ecc2a615399d8a6c864ea4c74ff9f523c2be0e341ac9be5d47d7c2d62",
"raw_data": {
"contract": [
{
"type": "TransferContract",
"parameter": {
"value": {
"amount": 1000000,
"owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
"to_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh"
}
}
}
],
"timestamp": 1719400000000
},
"signature": [
"a1b2c3..."
],
"ret": [
{
"contractRet": "SUCCESS"
}
]
}Response Parameters
Field
Type
Description
Use Cases
Error Handling
HTTP Status
Message
Description
Was this helpful?