⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

wallet/gettransactioninfobyid

Get detailed transaction information including receipt and logs by transaction ID.

Endpoint

POST /wallet/gettransactioninfobyid

Parameters

Required Parameters

ParameterTypeDescription
valuestringTransaction ID (hex string)

Response

Returns transaction information including:

  • id - Transaction ID
  • fee - Transaction fee in SUN
  • blockNumber - Block height
  • blockTimeStamp - Block timestamp
  • contractResult - Contract execution result
  • contract_address - Contract address (for contract creation)
  • receipt - Transaction receipt with energy and bandwidth usage
  • log - Transaction logs from smart contract events
  • result - Transaction result ("SUCCESS" or error)
  • resMessage - Result message (if any)

Implementation Examples

// 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: '7c2d4206c03a883dd9066d6c839d0deaef32dc5a0d9b15f6d06e506906c90332'
}),
});

const data = await response.json();
console.log(data);

Example Response

{
"id": "7c2d4206c03a883dd9066d6c839d0deaef32dc5a0d9b15f6d06e506906c90332",
"fee": 100000,
"blockNumber": 58234567,
"blockTimeStamp": 1702456789000,
"contractResult": [""],
"receipt": {
"energy_fee": 50000,
"energy_usage_total": 5000,
"net_fee": 50000,
"net_usage": 268,
"result": "SUCCESS"
},
"log": [
{
"address": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c",
"topics": [
"ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
],
"data": "0000000000000000000000000000000000000000000000000000000005f5e100"
}
],
"result": "SUCCESS"
}

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