Skip to main content
You can request a transaction record for up to 3 minutes after a transaction has reached consensus. This query returns a maximum of 180 records per request. The transaction record provides the following information about a transaction:

Transaction Record Contents

PropertyDescription
Transaction IDThe ID of the transaction.
Consensus timestampThe time the transaction reached consensus and was added to the ledger.
Contract Call ResultRecord of the value returned by the smart contract function (if it completed and didn’t fail) from ContractCallTransaction.
Contract Create ResultRecord of the value returned by the smart contract constructor (if it completed and didn’t fail) from ContractCreateTransaction.
ReceiptThe receipt of the transaction.
Transaction FeeThe transaction fee that was charged.
Transaction HashThe transaction hash.
Transaction MemoThe transaction memo if there was one added.
TransfersA list of transfers made in the transaction. The list of transfers includes a payment made to the node, the service fee, and transaction fee.
Token TransfersA list of the token transfers .
ScheduleRefThe schedule ID of the schedule transaction the record represents.
Assessed Custom FeesThis field applies to tokens that have custom fees and returns the custom fee(s) assessed in a token transfer transaction. This includes the amount, token ID, fee collector account ID (if applicable), and effective payer account ID. The effective payer accounts are accounts that were charged the custom fees.
Automatic AssociationsThe token(s) that were auto associated to the account in this transaction, if any
AliasIn the record of an internal AccountCreateTransaction triggered by a user transaction with a (previously unused) alias, the new account’s alias.
Parent Consensus TimestampThe parent consensus timestamp is found in the record of a child transaction. The parent consensus timestamp is the consensus timestamp related to the parent transaction to this child transaction.
Ethereum HashThe keccak256 hash of the ethereumData. This field will only be populated for EthereumTransaction.
Paid Staking RewardsList of accounts with the corresponding staking rewards paid as a result of a transaction. See HIP-406.
Network: previewnet/testnet
PRNG BytesIn the record of a PRNG transaction with no output range, a pseudorandom 384-bit string. See HIP-351.
Network: previewnet
PRNG NumberIn the record of a PRNG transaction with an output range, the output of a PRNG whose input was a 384-bit string. See HIP-351.
Network: previewnet
Pending AirdropThe ID of the pending airdrops as a result of the transaction.
Include ChildrenWhether or not to include the record for children transactions triggered by a parent transaction.
Include DuplicatesWhether or not to include the receipts for duplicate transactions.
Reject AirdropTransfer one or more tokens or token balances held by the requesting account to the treasury for each token type.
Transaction Signing Requirements
  • The client operator account private key is required to sign
ConstructorDescription
new TransactionRecordQuery()Initializes the TransactionRecordQuery Object
MethodTypeRequirement
setTransactionId(<transactionId>)TransactionIdRequired
setIncludeChildren(<value>)booleanOptional
setIncludeDuplicates(<value>)booleanOptional
new TransactionRecordQuery()
    .setTransactionId(transactionId)
    .execute(client)

Methods

MethodTypeRequirement
<TransactionResponse>.getRecord(<client>)TransactionRecordRequired
<TransactionRecord>.transactionIdTransactionIdOptional
<TransactionRecord>.consensusTimestampInstantOptional
<TransactionRecord>.contractFunctionResultContractFunctionResultOptional
<TransactionRecord>.receiptTransactionReceiptOptional
<TransactionRecord>.transactionFeeHbarOptional
<TransactionRecord>.transactionHashByteStringOptional
<TransactionRecord>.transactionMemoStringOptional
<TransactionRecord>.transfersList<Transfer>Optional
<TransactionRecord>.tokentransfersMap<TokenId, Map<AccountId, List<Long>>>Optional
<TransactionRecord>.scheduleRefScheduleIdOptional
<TransactionRecord>.assessedCustomFeesList<AssessedCustomFees>Optional
<TransactionRecord>.automaticTokenAssociationsList<TokenAssociation>Optional
<TransactionRecord>.ethereumHashByteStringOptional
<TransactionRecord>.parentConsensusTimestampInstantOptional
<TransactionRecord>.paidStakingRewardsList<Transfer>Optional
<TransactionRecord>.prngBytesByteStringOptional
<TransactionRecord>.prngNumberIntegerOptional
Account AliasIf an alias is set during account creation, it becomes immutable, meaning it cannot be changed. If you plan to update or rotate keys in the future, do not set the alias at the time of initial account creation. The alias can be set after finalizing all key updates.
//Create a transaction
AccountCreateTransaction transaction = new AccountCreateTransaction()
    .setKeyWithAlias(ecdsaPublicKey)
    // DO NOT set an alias with your key if you need to update/rotate keys in the future, Use .setKeyWithoutAlias instead 
    // .setKeyWithoutAlias(ecdsaPublicKey)
    .setInitialBalance(new Hbar(1));

//Sign with the client operator account key and submit to a Hedera network
TransactionResponse txResponse = transaction.execute(client);

//Request the record of the transaction
TransactionRecord record = txResponse.getRecord(client);

System.out.println("The transaction record is " +record);

//v2.0.0