gettransactionbyid - Tron

gettransactionbyid. Returns transaction details for a given transaction hash (ID).

gettransactionbyid - tron [Value: 20CU]
Returns transaction details for a given transaction hash (ID).
Use cases

Use cases

  • Also available as GET
  • Verify a transaction's contract type and parameters before displaying it
Constraints

Constraints

  • Returns an empty object if the transaction hasn't been broadcast or isn't yet indexed
  • Does not include execution receipts/logs; use gettransactioninfobyid for those
  • Also available under /walletsolidity/ for confirmed (solidified) data instead of the latest state
Get started
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --request POST \
     --url https://lb.drpc.live/tron/{API-KEY}/wallet/gettransactionbyid \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{"value": "example"}'
Copy
Response
200
{  
   "ret":[  
      {  
         "contractRet":"SUCCESS"
      }
   ],
   "signature":[  
      "ffbf691a89d95f6ad8175611c7d334c8159b95ff9c1e83872e7670103b185e85faf0a394b23d99581385d38038ab5c4684759c864a5621009f6e95da0a5feab501"
   ],
   "txID":"d0807adb3c5412aa150787b944c96ee898c997debdc27e2f6a643c771edb5933",
   "raw_data":{  
      "contract":[  
         {  
            "parameter":{  
               "value":{  
                  "amount":16,
                  "asset_name":"54726f6e696373",
                  "owner_address":"414a5fe0179f2dd9c900194e63d661863cd0ade7b0",
                  "to_address":"41718de6b323652d1257437ace160c4f4198aae4e1"
               },
               "type_url":"type.googleapis.com/protocol.TransferAssetContract"
            },
            "type":"TransferAssetContract"
         }
      ],
      "ref_block_bytes":"6bdd",
      "ref_block_hash":"1616edaf3a57fe19",
      "expiration":1546455678000,
      "timestamp":1546455620175
   }
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersobject
object
valuestring
[Required for GET] The transaction hash (ID) to look up
visibleboolean
Set to true to format addresses in Base58; set to false for hex format. (Default: false)

Response

200
Returns transaction details for a given transaction hash (ID).

Response params

object
retarray_of_objects
The execution outcome of this transaction as recorded on-chain.
object
contractRetstring
The result status of the contract execution (e.g. SUCCESS, REVERT, OUT_OF_ENERGY).
signaturearray_of_strings
The list of hex-encoded signatures authorizing this transaction.
txIDstring
The unique transaction hash (transaction ID), computed as the SHA256 of raw_data.
raw_dataobject
The unsigned transaction body containing the contract instruction and blockchain reference data.
object
contractarray_of_objects
The list of contract instructions executed by this transaction.
object
parameterobject
The typed payload describing the specific contract call being made.
object
valueobject
The decoded fields of the contract — here, a TRC10 asset transfer.
object
amountinteger
The quantity of the TRC10 token being transferred, in its smallest unit.
asset_namestring
The hex-encoded identifier of the TRC10 token being transferred.
owner_addressstring
The address sending the TRC10 token, in hex format.
to_addressstring
The address receiving the TRC10 token, in hex format.
type_urlstring
The fully qualified protobuf type identifier describing which contract schema `value` should be decoded with.
typestring
The human-readable name of the contract type being executed (here, TransferAssetContract).
ref_block_bytesstring
The last two bytes of the reference block number, used for transaction expiration and replay protection.
ref_block_hashstring
The last eight bytes of the reference block's hash, paired with ref_block_bytes for replay protection.
expirationinteger
Unix timestamp, in ms, after which this transaction is no longer valid and will be rejected by the network.
timestampinteger
Unix timestamp, in ms, marking when the transaction was created/signed by the client.