wallet/gettransactioninfobyid
Get detailed transaction information including receipt and logs by transaction ID.
Endpoint
POST /wallet/gettransactioninfobyid
Parameters
Required Parameters
| Parameter | Type | Description |
|---|---|---|
value | string | Transaction ID (hex string) |
Response
Returns transaction information including:
id- Transaction IDfee- Transaction fee in SUNblockNumber- Block heightblockTimeStamp- Block timestampcontractResult- Contract execution resultcontract_address- Contract address (for contract creation)receipt- Transaction receipt with energy and bandwidth usagelog- Transaction logs from smart contract eventsresult- Transaction result ("SUCCESS" or error)resMessage- Result message (if any)
Implementation Examples
- cURL
- JavaScript
- Python
curl -X POST https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/wallet/gettransactioninfobyid \
-H "Content-Type: application/json" \
-d '{
"value": "2668be54c278d702eebde274a58cfae3ea50c72c76a885df48c6d456d7ec38b5"
}'
// Get transaction receipt information
const response = await fetch('https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/wallet/gettransactioninfobyid', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
value: '2668be54c278d702eebde274a58cfae3ea50c72c76a885df48c6d456d7ec38b5'
}),
});
const data = await response.json();
console.log(data);
import requests
url = "https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/wallet/gettransactioninfobyid"
payload = {
"value": "2668be54c278d702eebde274a58cfae3ea50c72c76a885df48c6d456d7ec38b5"
}
response = requests.post(url, json=payload)
print(response.json())
Example Response
{
"id": "2668be54c278d702eebde274a58cfae3ea50c72c76a885df48c6d456d7ec38b5",
"blockNumber": 76245444,
"blockTimeStamp": 1759396656000,
"contractResult": [
"0000000000000000000000000000000000000000000000000000000000000000"
],
"contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"receipt": {
"energy_usage": 64284,
"origin_energy_usage": 1,
"energy_usage_total": 64285,
"net_usage": 345,
"result": "SUCCESS",
"energy_penalty_total": 49635
},
"log": [
{
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"topics": [
"ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"000000000000000000000000d3048cf7d52e765643ad653bf8e17724b8887cdc",
"00000000000000000000000083f5fda1a451a2c0d7739cb3b1891b103c13252f"
],
"data": "0000000000000000000000000000000000000000000000000000000009896800"
}
]
}
Use Cases
- Transaction Confirmation: Get detailed receipt after broadcasting
- Event Monitoring: Access smart contract event logs
- Fee Tracking: Monitor energy and bandwidth consumption
- Debug Failures: Analyze failed transaction reasons
- DApp Integration: Verify transaction results in applications
Related Methods
- wallet/gettransactionbyid - Get basic transaction data
- wallet/broadcasttransaction - Broadcast signed transaction
- wallet/triggersmartcontract - Call smart contract function