Unicorn Ultra
  • Welcome to unicorn ultra — let’s build the future
  • Getting Started
    • Introduction
    • Environment Setup
    • Create an Account
    • Transfer U2U
    • Query Ledger Data
  • Tutorials
    • Smart Contracts
      • Deploy Your First Smart Contract
      • Deploy a Contract Using the Hedera Token Service
      • Send and Receive HBAR Using Solidity Smart Contracts
      • Create an HBAR Faucet App Using React and MetaMask
      • Deploy By Leveraging Ethereum Developer Tools On Hedera
      • Deploy a Smart Contract Using Hardhat
      • Deploy a Subgraph Using The Graph and JSON-RPC
      • How to Set Up Foundry to Test Smart Contracts on Hedera
      • Deploy Smart Contracts on Hedera Using Truffle
    • Consensus
      • Submit Your First Message
      • Submit Message to Private Topic
      • Query Messages with Mirror Node
    • Tokens
      • Create and Transfer Your First NFT
      • Create and Transfer Your First Fungible Token
      • Create and Transfer an NFT using a Solidity Contract
      • Structure Your Token Metadata Using JSON Schema V2
    • More Tutorials
      • How to Auto-Create Hedera Accounts with HBAR and Token Transfers
      • How to Configure a Mirror Node and Query Data
      • How to Generate a Random Number on Hedera
      • Get Started with the Hedera Consensus Service Fabric Plugin
        • Virtual Environment Setup
      • Schedule Your First Transaction
      • How to Connect to Hedera Networks Over RPC
        • Configuring Hashio RPC endpoints
        • Configuring Arkhia RPC endpoints
        • Configuring Hedera JSON-RPC Relay endpoints
    • Demo Applications
    • Starter Projects
  • Networks
    • Mainnet
      • Mainnet Accounts
      • Mainnet Consensus Nodes
        • Node Requirements
          • Reference Configuration
          • FAQ
      • Fees
        • Transaction Records
    • Testnets
      • Testnet Accounts
      • Testnet Consensus Nodes
    • Network Explorers and Tools
    • Release Notes
      • Hedera Services
      • Hedera Mirror Node
  • Core Concepts
    • Accounts
      • Account Creation
      • Auto Account Creation
      • Account Properties
    • Keys and Signatures
    • Scheduled Transaction
    • Smart Contracts
      • Hyperledger Besu EVM
      • Gas and Fees
      • Solidity Variables and Opcodes
      • Supported ERC Token Standards
      • Hedera Services Integration with Smart Contracts
      • JSON-RPC Relay
      • Hethers
      • Smart Contract Security
    • Staking
      • Staking Program
      • Stake HBAR
    • Hashgraph Consensus Algorithm
      • Gossip About Gossip
      • Virtual Voting
    • Transactions and Queries
    • State and History
    • Mirror Nodes
      • Hedera Mirror Node
      • One Click Mirror Node Deployment
      • Run Your Own Mirror Node
        • Run Your Own Mirror Node with Google Cloud Storage (GCS)
        • Run Your Mirror Node with Amazon Web Services S3 (AWS)
      • Hedera ETL
  • SDKs & APIs
    • SDKs
      • Build Your Hedera Client
      • Set Up Your Local Network
      • Network Address Book
      • Keys
        • Generate a new key pair
        • Import an existing key
        • Create a key list
        • Create a threshold key
        • Generate a mnemonic phrase
        • Recover keys from a mnemonic phrase
      • HBAR
      • Specialized Types
      • Pseudorandom Number Generator
      • Transactions
        • Transaction ID
        • Modify transaction fields
        • Create an unsigned transaction
        • Manually sign a transaction
        • Submit a transaction
        • Sign a multisignature transaction
        • Get a transaction receipt
        • Get a transaction record
      • Schedule Transaction
        • Schedule ID
        • Create a scheduled transaction
        • Sign a scheduled transaction
        • Delete a scheduled transaction
        • Get schedule info
        • Network Response Messages
        • Schedule FAQ
      • Queries
      • General Network Response Messages
      • Accounts and HBAR
        • Create an account
        • Update an account
        • Transfer cryptocurrency
        • Approve an allowance
        • Delete an allowance
        • Delete an account
        • Get account balance
        • Get account info
        • Network Response Messages
      • Consensus Service
        • Create a topic
        • Update a topic
        • Submit a message
        • Delete a topic
        • Get topic messages
        • Get topic info
        • Network Response
      • Token Service
        • Token ID
        • NFT ID
        • Token types
        • Create a token
        • Custom token fees
        • Update a token
        • Update token custom fees
        • Transfer tokens
        • Delete a token
        • Mint a token
        • Burn a token
        • Freeze an account
        • Unfreeze an account
        • Enable KYC account flag
        • Disable KYC account flag
        • Associate tokens to an account
        • Dissociate tokens from an account
        • Pause a token
        • Unpause a token
        • Wipe a token
        • Atomic swaps
        • Get account token balance
        • Get token info
        • Get NFT info
        • Network Response Messages
      • File Service
        • Create a file
        • Append to a file
        • Update a file
        • Delete a file
        • Get file contents
        • Get file info
        • Network Response Messages
      • Smart Contract Service
        • Delegate Contract ID
        • Create a smart contract
        • Update a smart contract
        • Delete a smart contract
        • Call a smart contract function
        • Ethereum transaction
        • Get a smart contract function
        • Get smart contract bytecode
        • Get smart contract info
        • Hedera Service Solidity Libraries
        • Network Response Messages
      • Signature Provider
        • Provider
        • Signer
        • Wallet
        • Local Provider
    • REST API
    • Hedera Consensus Service gRPC API
    • Hedera APIs
      • Basic Types
        • AccountAmount
        • AccountID
        • ContractID
        • CryptoAllowance
        • CurrentAndNextFeeSchedule
        • FeeComponents
        • FeeData
        • FeeSchedule
        • FileID
        • Fraction
        • HederaFunctionality
        • Key
        • KeyList
        • NftAllowance
        • NftTransfer
        • NodeAddress
        • NodeAddressBook
        • RealmID
        • ScheduleID
        • SemanticVersion
        • ServicesConfigurationList
        • ServiceEndpoint
        • Setting
        • ShardID
        • Signature
        • SignatureList
        • SignatureMap
        • SignaturePair
        • SubType
        • TransferList
        • TransactionID
        • ThresholdKey
        • ThresholdSignature
        • TokenAllowance
        • TokenBalance
        • TokenBalances
        • TokenFreezeStatus
        • TokenPauseStatus
        • TokenID
        • TokenKycStatus
        • TokenRelationship
        • TokenTransferList
        • TokenType
        • TokenSupplyType
        • TopicID
        • TransactionFeeSchedule
      • Cryptocurrency Accounts
        • CryptoService
        • CryptApproveAllowance
        • CryptoDeleteAllowance
        • CryptoCreate
        • CryptoTransfer
        • CryptoUpdate
        • CryptoDelete
        • CryptoGetAccountBalance
        • CryptoGetAccountRecords
        • CryptoGetInfo
        • CryptoGetStakers
      • Consensus Service
        • Consensus Service
        • ConsensusCreateTopic
        • ConsensusUpdateTopic
        • ConsensusSubmitMessage
        • ConsensusDeleteTopic
        • ConsensusTopicInfo
        • ConsensusGetTopicInfo
      • Schedule Service
        • ScheduleService
        • SchedulableTransactionBody
        • ScheduleCreate
        • ScheduleDelete
        • ScheduleSign
        • ScheduleGetInfo
      • Token Service
        • TokenService
        • CustomFees
          • AssessedCustomFee
          • CustomFee
          • FractionalFee
          • FixedFee
          • RoyaltyFee
        • TokenCreate
        • TokenUpdate
        • TokenFeeScheduleUpdate
        • TokenDelete
        • TokenMint
        • TokenBurn
        • TokenFreezeAccount
        • TokenUnfreezeAccount
        • TokenGrantKyc
        • TokenRevokeKyc
        • TokenAssociate
        • TokenDissociate
        • TokenWipeAccount
        • TokenPause
        • TokenUnpause
        • TokenGetInfo
        • TokenGetNftInfo
        • TokenGetNftInfos
        • TokenGetAccountNftInfo
      • File Service
        • FileService
        • FileCreate
        • FileAppend
        • FileUpdate
        • FileDelete
        • FileGetContents
        • FileGetInfo
      • Smart Contracts
        • SmartContractService
        • ContractCall
        • ContractCallLocal
        • ContractCreate
        • ContractUpdate
        • ContractDelete
        • ContractGetByteCode
        • ContractGetInfo
        • ContractGetRecords
      • Miscellaneous
        • Duration
        • ExchangeRate
        • Freeze
        • FreezeType
        • GetByKey
        • GetBySolidityID
        • NetworkGetVersionInfo
        • NetworkService
        • Query
        • QueryHeader
        • Response
        • ResponseCode
        • ResponseHeader
        • SystemDelete
        • SystemUndelete
        • TimeStamp
        • Transaction
        • TransactionBody
        • TransactionContents
        • TransactionGetFastRecord
        • TransactionGetReceipt
        • TransactionGetRecord
        • TransactionReceipt
        • TransactionRecord
        • TransactionResponse
        • UncheckedSubmit
    • Deprecated
      • SDKs (V1)
        • Build your Hedera client
        • Set-up Your Local Network
        • Network address book
        • Keys
          • Generate a new key pair
          • Import an existing key
          • Create a key list
          • Create a threshold key
          • Generate a mnemonic phrase
          • Recover keys from a mnemonic phrase
        • Hbars
        • Specialized Types
        • Pseudorandom Number Generator
        • Transactions
          • Transaction ID
          • Modify transaction fields
          • Create an unsigned transaction
          • Manually sign a transaction
          • Submit a transaction
          • Sign a multisignature transaction
          • Get a transaction receipt
          • Get a transaction record
        • Scheduled Transaction
          • Schedule ID
          • Create a scheduled transaction
          • Sign a scheduled transaction
          • Delete a scheduled transaction
          • Get schedule info
          • Network Response Messages
          • Schedule FAQ
        • Queries
        • General Network Response Messages
        • Accounts and hbar
          • Create an account
          • Update an Account
          • Transfer cryptocurrency
          • Approve an allowance
          • Delete an allowance
          • Delete an account
          • Get account balance
          • Get account info
          • Network Response Messages
        • Consensus Service
          • Create a topic
          • Update a topic
          • Submit a message
          • Delete a topic
          • Get topic messages
          • Get topic info
        • Token Service
          • Token ID
          • NFT ID
          • Token types
          • Create a token
          • Custom token fees
          • Update a token
          • Update token custom fees
          • Transfer tokens
          • Delete a token
          • Mint a token
          • Burn a token
          • Freeze an account
          • Unfreeze an account
          • Enable KYC account flag
          • Disable KYC account flag
          • Associate tokens to an account
          • Dissociate tokens from an account
          • Pause a token
          • Unpause a token
          • Wipe a token
          • Atomic swaps
          • Get account token balance
          • Get token info
          • Get NFT info
          • Network Response Messages
        • File Service
          • Create a file
          • Append to a file
          • Update a file
          • Delete a file
          • Get file contents
          • Get file info
          • Network Response Messages
  • Support & Community
    • Glossary
    • Discord
    • GitHub
    • Stack Overflow
    • Hedera Blog
    • Bug Bounty
    • Hedera Help
    • Meetups
    • Contributing Guide
    • Brand Guidelines
    • Status Page
Powered by GitBook
On this page
  1. SDKs & APIs
  2. SDKs
  3. Transactions

Get a transaction record

PreviousGet a transaction receiptNextSchedule Transaction

Last updated 1 year ago

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

Transaction Record Contents

Fields

Description

Transaction ID

The ID of the transaction.

Consensus timestamp

The time the transaction reached consensus and was added to the ledger.

Contract Call Result

Record of the value returned by the smart contract function (if it completed and didn't fail) from ContractCallTransaction.

Contract Create Result

Record of the value returned by the smart contract constructor (if it completed and didn't fail) from ContractCreateTransaction.

Receipt

The receipt of the transaction.

Transaction Fee

The transaction fee that was charged.

Transaction Hash

The transaction hash.

Transaction Memo

The transaction memo if there was one added.

Transfers

A 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 Transfers

A list of the token transfers .

ScheduleRef

The schedule ID of the schedule transaction the record represents.

Assessed Custom Fees

This 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 Associations

The token(s) that were auto associated to the account in this transaction, if any

Alias

In the record of an internal AccountCreateTransaction triggered by a user transaction with a (previously unused) alias, the new account's alias.

Parent Consensus Timestamp

The 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 Hash

The keccak256 hash of the ethereumData. This field will only be populated for EthereumTransaction.

Paid Staking Rewards

PRNG Bytes

PRNG Number

Transaction Signing Requirements

  • The client operator account private key is required to sign

Constructor

Description

new TransactionRecordQuery()

Initializes the TransactionRecordQuery Object

  • Transaction ID: The ID of the transaction to return the record for

  • Include Children: Whether or not to include the record for children transactions triggered by a parent transaction

  • Include Duplicates: Whether or not to include the receipts for duplicate transactions

Method

Type

Requirement

setTransactionId(<transactionId>)

TransactionId

Required

setIncludeChildren(<value>)

boolean

Optional

setIncludeDuplicates(<value>)

boolean

Optional

new TransactionRecordQuery()
    .setTransactionId(transactionId)
    .execute(client)
new TransactionRecordQuery()
    .setTransactionId(transactionId)
    .execute(client)
hedera.NewTransactionRecordQuery().
    SetTransactionId(transactionId).
    Execute(client)

Methods

Method

Type

Requirement

<TransactionResponse>.getRecord(<client>)

TransactionRecord

Required

<TransactionRecord>.transactionId

TransactionId

Optional

<TransactionRecord>.consensusTimestamp

Instant

Optional

<TransactionRecord>.contractFunctionResult

ContractFunctionResult

Optional

<TransactionRecord>.receipt

TransactionReceipt

Optional

<TransactionRecord>.transactionFee

Hbar

Optional

<TransactionRecord>.transactionHash

ByteString

Optional

<TransactionRecord>.transactionMemo

String

Optional

<TransactionRecord>.transfers

List<Transfer>

Optional

<TransactionRecord>.tokentransfers

Map<TokenId, Map<AccountId, List<Long>>>

Optional

<TransactionRecord>.scheduleRef

ScheduleId

Optional

<TransactionRecord>.assessedCustomFees

List<AssessedCustomFees>

Optional

<TransactionRecord>.automaticTokenAssociations

List<TokenAssociation>

Optional

<TransactionRecord>.ethereumHash

ByteString

Optional

<TransactionRecord>.parentConsensusTimestamp

Instant

Optional

<TransactionRecord>.paidStakingRewards

List<Transfer>

Optional

<TransactionRecord>.prngBytes

ByteString

Optional

<TransactionRecord>.prngNumber

Integer

Optional

//Create a transaction
AccountCreateTransaction transaction = new AccountCreateTransaction()
        .setKey(newKey.getPublicKey())
        .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
//Create a transaction
const transaction = new AccountCreateTransaction()
        .setKey(newKey.getPublicKey())
        .setInitialBalance(new Hbar(1));

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

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

console.log("The transaction record is " +record);

//v2.0.0
//Create a transaction
transaction := hedera.NewAccountCreateTransaction().
		SetKey(privateKey.PublicKey()).
		SetInitialBalance(hedera.NewHbar(1000))

//Sign with the client operator account key and submit to a Hedera network
txResponse, err := transaction.Execute(client)

//Request the record of the transaction
record, err := txResponse.GetRecord(client)

fmt.Printf("The transaction record is %v\n", record)

//v2.0.0
TransactionRecord{
     receipt=TransactionReceipt{
          status=SUCCESS, 
          exchangeRate=ExchangeRate{
               hbars=30000, cents=116646, 
               expirationTime=2020-09-04T03:00:007
          }, 
         accountId=0.0.97001, 
         fileId=null, 
         contractId=null, 
         topicId=null, 
         topicSequenceNumber=null
    },                  
    transactionHash=e005670a1f49c4fd776b2d432db3e5cb31441 bb5a35bff412ec3b41cb1 3366ce00b5c1b9900aad1467f9709a649ccc20, 
     consensusTimestamp=2020-11-05T08:34:31.107311002Z,
     transactionId=0.0.9401@160456525 8.479476328,
     transactionMemo=, 
     transactionFee=0.25401241 ℏ, 
     contractFunctionResult=null, 
     transfers=[
          Transfer{accountId=0.0.5, amount=0.01501152 ℏ}, (node fee)
          Transfer{accountId=0.0.98, amount=0.23900089 ℏ}, (service fee)
          Transfer{accountId=0.0.9401, amount=-1.25401241 ℏ}, (transaction fee) initial balance of new account
          Transfer{accountId=0.0.97001, amount=1 ℏ} (Initial balance of the new account)
     ]
     tokenTransfers={},
     scheduleRef=null,
     assessedCustomFees=[],
     automaticTokenAssociations=[TokenAssociation{
          tokenId=0.0.27335, accountId=0.0.27333}]
}

List of accounts with the corresponding staking rewards paid as a result of a transaction. See . Network: previewnet/testnet

In the record of a PRNG transaction with no output range, a pseudorandom 384-bit string. See . Network: previewnet

In the record of a PRNG transaction with an output range, the output of a PRNG whose input was a 384-bit string. See . Network: previewnet

180 records
HIP-406
HIP-351
HIP-351