Get Transactions By Hashes
POST
Retrieves information for multiple transactions. Up to 1,000 transactions can be queried.
🚧 Getting a 429 error? Check your subscription plan!
A 429 error may occur when the throughput limit of your subscribed plan is exceeded.
For example, the Starter plan has a limit of 300 CU per second, so calling an API that consumes 350 CU while on the Starter plan may result in a 429 error.
Check the CU consumption of the API you are using on the Compute Unit Costs page, and consider upgrading to a higher plan if you need more throughput!
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.networkstringrequired
Parameter specifying the network of the target chain.Request Body
transactionHashesarrayrequired
withLogsboolean
Parameter specifying whether to include the logs field in the response. Response speed may be slower when set to true.withDecodeboolean
Parameter specifying whether to include decodedInput and decodedLog fields in the response. Response speed may be slower when set to true.decodedLog is part of logs, so it is not included when withLogs is false even if withDecode is true.decodedInput interprets the transaction input field and provides the result. However, different functions may use the same function selector, so the result may not match the actually called function. Additional verification is recommended for non-standard ERC functions.Responses
transactionHashstringrequired
Unique hash value that identifies the transaction. This field has a 64-character hexadecimal string format excluding the prefix (0x).transactionIndexintegerrequired
Order in which the transaction was included within a specific block; indicates the execution order of the transaction.transactionTimestampintegerrequired
Indicates when the transaction was created in milliseconds. The time when the transaction was created may differ from when it was included in a block; the actual state change is applied at the block timestamp when the transaction is included in the block.blockNumberintegerrequired
Unique number of the block. This number indicates the order in which the block was created on the blockchain.blockTimestampintegerrequired
Timestamp of when the block was created, provided in milliseconds. Stored in Unix timestamp format.refBlockBytesstringrequired
Indicates the block referenced by the transaction. This field uses the 6th to 7th bytes of the reference block number, totaling 2 bytes. The reference block is the most recently finalized block; this value is embedded in the transaction to prevent transaction replay.refBlockHashstringrequired
Indicates the block referenced by the transaction. This field uses the 8th to 15th bytes of the reference block hash, totaling 8 bytes. The reference block is the most recently finalized block; this value is embedded in the transaction to prevent transaction replay.typestringrequired
Indicates the type of transaction. This field specifies the specific action performed by the transaction so the network can process it accordingly. Values include TransferContract, TriggerSmartContract, etc., defining operations such as TRX transfer and smart contract execution.typeUrlstringrequired
Field that specifies the specific path of the transaction type. This field is used to identify transaction types defined in chain buffer format. isMultiSigbooleanrequired
Field indicating whether the transaction is a multi-signature transaction. Multi-sig requires signatures from multiple accounts and is used to enhance security.fromstringrequired
Represents the sender address that created the transaction. That is, the account address from which the transaction originates. This field has a 34-character base58 string format starting with "T".tostringrequired
Represents the recipient address that will receive the transaction. Depending on the transaction type, this may mean the address receiving the transferred TRX or the smart contract being invoked. This field has a 34-character base58 string format starting with "T".valuestringrequired
Represents the amount of assets transferred in the transaction. These assets include TRX or TRC10 tokens. <strong style='color: red;'>*</strong> The type of asset transferred depends on the "assetId" field value. When "assetId" is 0, it represents the TRX amount; when non-zero, it represents the amount of a specific TRC10 token. The amount is expressed in the smallest unit (e.g., sun for TRX) as a decimal string.assetIdintegerrequired
Identifier for the token being transferred (TRX, TRC10). <strong style='color: red;'>*</strong> When the "assetId" field is 0, it means TRX; when non-zero, it means a specific TRC10 token.inputstringrequired
Represents the data or input value passed when invoking a smart contract. Primarily used as parameter values for smart contract functions, specifying the actions the contract should perform.functionSelectorstringrequired
Represents the unique identifier of the function executed in the transaction. For example, the signature of the transfer(address,uint256) function generates a specific hash through Keccak-256 hashing, and the first 4 bytes of this hash are used as the function selector.resultstringrequired
Indicates the final status of the transaction execution. Provides the overall result of whether the entire transaction was processed successfully, allowing users to easily verify if the transaction completed successfully. Status values are SUCCESS and FAILED.<strong style='color: red;'>*</strong> Even if smart contract execution fails, the transaction itself is considered successful if it was recorded on the blockchain.contractRetstringrequired
Indicates the smart contract execution result, providing more detailed information about the transaction success or failure.- Examples: SUCCESS, REVERT, BAD_JUMP_DESTINATION, OUT_OF_MEMORY, PRECOMPILED_CONTRACT, ...
resMessagestringrequired
When transaction execution fails, represents the failure reason or error message. Returns an empty string for successful transactions.feestringrequired
Total TRX cost consumed during transaction execution. When the bandwidth and energy of the account that created the transaction are insufficient, the shortfall is covered in TRX. This field represents that shortfall and is the sum of netFee and energyFee. For example, if bandwidth and energy are sufficient, fee is 0. Otherwise, it indicates the amount of TRX consumed to cover the shortfall. The unit of this field is "sun", and 1 TRX = 1,000,000 sun.feeLimitstringrequired
Maximum fee limit set by the user when creating the transaction; specifies the upper limit of fees that can be consumed when the transaction is executed. If the actual fee used exceeds feeLimit, the transaction fails. This allows users to prevent unexpected high fees in advance. The unit of this field is "sun", and 1 TRX = 1,000,000 sun.netFeestringrequired
Cost paid in TRX when the bandwidth of the transaction creator's account is insufficient. If available bandwidth is sufficient, no netFee is incurred. The unit of this field is "sun", and 1 TRX = 1,000,000 sun.netUsagestringrequired
Amount of bandwidth actually used in the transaction. When the transaction creator's remaining bandwidth is insufficient, the shortfall is paid in TRX, and the amount paid is recorded in netFee.energyFeestringrequired
Represents the cost paid in TRX when the energy of the transaction creator's account is insufficient. Only incurred when the energy required for smart contract execution exceeds the creator's available balance. The unit of this field is "sun", and 1 TRX = 1,000,000 sun.energyUsagestringrequired
Amount of energy used from the transaction creator's account. originEnergyUsagestringrequired
Represents the amount of energy used from the account that deployed the smart contract. In certain situations, the contract deployer may bear some of the energy cost.energyUsageTotalstringrequired
Total amount of energy consumed in the transaction. Sum of energy consumed by the transaction creator (energyUsage) and energy consumed by the deployed smart contract (originEnergyUsage), representing the total energy usage for transaction execution.energyPenaltyTotalstringrequired
Additional energy amount that must be paid when calling certain popular smart contracts. Because TRON network resources (bandwidth and energy) are limited, penalties are applied to prevent excessive resource usage by specific popular smart contracts.permissionIdinteger
Field that specifies the permission to use for the transaction.- 0: Indicates Owner permission.
- 1: Indicates Witness permission. Related to block production; cannot be used for transaction signing.
- 2 or higher: Indicates Active permission groups. Specifies the user group that can execute transactions.
assetIssueIdinteger
Value that identifies the TRC10 issued by the transaction. Returns the TRC10 asset ID when the transaction type is AssetIssueContract; returns null for other transaction types.withdrawAmountstring
Represents the amount of rewards withdrawn, in sun. For reward withdrawal and unfreeze transactions, voting rewards are withdrawn to the account. The unit of this field is "sun", and 1 TRX = 1,000,000 sun.withdrawExpireAmountstring
In the Stake2.0 phase, represents the amount of TRX withdrawn to the account for the following transactions. The unit of this field is "sun", and 1 TRX = 1,000,000 sun.1. Unstaking transaction2. Transaction that withdraws unfrozen balance to the account3. Transaction that cancels all unstaking requestsunfreezeAmountstring
In the Stake1.0 phase, for unstaking transactions, this field returns the amount of unstaked TRX. The unit of this field is "sun", and 1 TRX = 1,000,000 sun.Amount of TRX used to re-stake the cancelled unstaking principal to obtain various resources such as BANDWIDTH, ENERGY, or TRON POWER.
energystring
Amount of TRX used to re-stake the cancelled unstaking principal to obtain energy. The value is expressed in SUN units.tronPowerstring
Amount of TRX used to re-stake the cancelled unstaking principal to obtain TRON Power (voting and governance participation rights on the TRON network). The value is expressed in SUN units.bandwidthstring
Amount of TRX used to re-stake the cancelled unstaking principal to obtain bandwidth. The value is expressed in SUN units.exchangeIdinteger
Unique ID that identifies a swap transaction on the decentralized exchange (DEX) provided by the TRON network. This ID distinguishes specific swap transactions and tracks which asset pair was traded.exchangeReceivedAmountstring
Represents the final amount of assets received through a swap transaction on the decentralized exchange (DEX) provided by the TRON network.exchangeInjectAnotherAmountstring
Amount of the other asset additionally injected during a swap transaction on the decentralized exchange (DEX) provided by the TRON network.exchangeWithdrawAnotherAmountstring
Represents the amount withdrawn in another asset after a swap transaction on the decentralized exchange (DEX) provided by the TRON network.Value decoded from the input data based on ABI when calling a smart contract. For regular transfers such as native token (TRX) transfers that are not smart contract calls, no input data exists, so this field is not provided.<strong style='color: red;'>*</strong> This field is only provided when withDecode is true.
typestring
Represents the type of the decoded data. For example, returns "function" for smart contract function calls.namestring
Represents the name of the smart contract function that was called. The function name is determined by the ABI definition.signaturestring
Signature of the smart contract function, explicitly expressing the function name and parameter data types. Used to identify the uniqueness of the function.List of arguments passed to the called function, including the name, type, and actual value of each argument. May have multiple arguments depending on the ABI.
namestring
Name of the specific argument used in the function call, representing the argument name defined in the ABI.typestring
Represents the data type of the argument. Common data types include "address", "integer", "string", "bool", etc.valuestring
Represents the actual value passed to the argument. The format varies by data type; for example, an "address" type displays a wallet address.codestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "MISSING_REQUIRED_PARAMETER","message": "Missing required parameter: { PARAMETER_NAME }"}
cURL
curl -X POST 'https://web3.nodit.io/v1/tron/mainnet/blockchain/getTransactionsByHashes' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"transactionHashes": ["7dedf74e3f0faaf03385292020a8f3b6c82c1886f3bd45edb2edaea4d0dc29a1","8cb2673b89baba29cce93d21c75099e639f11a4d950728bb4ea2ddf2a741be97"],"withLogs": false,"withDecode": false}'