HomeGuidesAPI ReferenceChangelog
GuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsChange Log
API Reference

GetTransactionInfoById

Query the transaction's Info, including the transaction fee, block height, and virtual machine logs.

Returns

This interface returns a TransactionInfo object containing the following fields:

Field

Type

Description

id

string

Transaction ID (hash).

fee

int64

Total amount of TRX burned as fee for this transaction, including for Bandwidth/Energy, account activation, memo, multi-signature, and other operations. (Unit: sun).

blockNumber

int64

Block number (height).

blockTimeStamp

int64

Block timestamp. (Unit: millisecond).

contractResult

string[]

Transaction execution results.

contract_address

string

Contract address.

receipt

ResourceReceipt

Transaction receipt, including execution result and transaction fee details, which contains the following fields:

  • energy_usage: Amount of Energy consumed in the caller's account
  • energy_fee: Amount of TRX burned to pay for Energy.
  • origin_energy_usage: Amount of Energy consumed in the contract deployer's account
  • energy_usage_total: Total amount of Energy consumed by the transaction.
  • net_usage: Amount of Bandwidth consumed.
  • net_fee: Amount of TRX burned to pay for Bandwidth.
  • result: Transaction execution result.
  • energy_penalty_total: Amount of extra Energy that needs to be paid for calling a few popular contracts"

log

Log[]

List of event logs triggered during the smart contract call. Each event log includes the following information:

  • address: Contract address. Note that, for EVM compatibility, TVM uses a hex format address without the 0x41 prefix. When parsing an address from the log, you need to prepend 41 to form the full Tron hex address, and convert it to Base58Check if needed.
  • topics: The topic of the event, including the event signature and all indexed parameters.
  • data: The parameters that are not marked as indexed.

result

int

Transaction execution result. Omitted if successful; FAILED if failed.

resMessage

string

Detailed error message if the transaction failed. (Format: hex string).

assetIssueID

string

The ID of the issued TRC10 token.

withdraw_amount

int64

Amount of voting rewards withdrawn to the account in this transaction. (Applies only to reward withdrawal transactions, Unit: sun).

unfreeze_amount

int64

Amount of TRX unstaked. (Applies only to unstaking transactions for Stake 1.0, Unit: sun).

internal_transactions

InternalTransaction[]

Array of internal transactions. See here for details.

withdraw_expire_amount

int64

Amount of unfrozen TRX withdrawn to the account in this transaction. (Applies only to unstaking, unfrozen balance withdrawal, and cancel-all-unstakes transactions. For Stake 2.0, Unit: sun).

cancel_unfreezeV2_amount

map<string, int64>

Amount of TRX re-staked (canceled unstake), keyed by resource type ("BANDWIDTH" or "ENERGY"). (Unit: sun).

exchange_received_amount

int64

The amount of tokens received.

exchange_inject_another_amount

int64

The amount of the other token injected into the trading pair.

exchange_withdraw_another_amount

int64

The amount of the other token withdrawn from the trading pair.

exchange_id

int64

The ID of the trading pair.

shielded_transaction_fee

int64

Shielded transaction fee.


Language
Click Try It! to start a request and see the response here!