The transactions field allows us to fetch transactions details from Tron blockchain.
Here is an example that demonstrates how to fetch transaction data:
{
tron {
transactions(
date: {after: "2023-07-26"}
options: {desc: "block.timestamp.iso8601", limit: 10}
) {
block {
height
timestamp {
iso8601
}
}
contractAddress {
address
}
energyFee
energyUsageTotal
hash
index
netFee
netUsage
refBlockHash
result
signatures
logsCount
internalTransactionsCount
}
}
}
Filtering Transactions
any:contractAddress: filter by contract addressdate: filter by date of the transactionheight: filter by block heightoptions: filter returned data by ordering, limiting, and constraining itrefBlockHash: filter by ref block hashsuccess: filter by success of the transactiontime: filter by selecting time in range, list or just timetxHash: filter by transaction hashtxIndex: filter index of transaction in the block
any:block: returns block where transaction is includedcontractAddress: returns contract addresscount: returns count and other metrics of transactioncountBigInt: returns count and other metrics asBigIntdate: returns date of the transactionenergyFee: returns energy fee of the transactionenergyUsageTotal: returns total energy usage for transactionexpiration: returns expirationexpression: performs arithematic operation on fields in the query and returns value of the operationfee: returns transaction feefeeLimit: returns transaction fee limithash: returns transaction hashindex: returns index of transaction in the blockinternalTransactionsCount: returns internal transactions countinternalTransactionsCountBigInt: returns internal transactions count asBigIntlogsCount: returns logs countlogcCountBigInt: returns logs count asBigIntmaximum: returns maximum for selected measurable field of Tron transactionsminimum: returns minimum for selected measurable field of Tron transactionsnetFee: returns net fee for transactionnetUsage: returns net usage for transactionrefBlockHash: returns ref block hash as hexresult: returns result messagesignatures: returns signaturessuccess: returns if transaction is successful or not