Get Transactions By Account
POST
Retrieves the list of transactions sent or received by a specific account.
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.networkstringrequired
Parameter specifying the network of the target chain.Request Body
accountAddressstringrequired
Parameter specifying the account address to query. This field uses a 34-character base58 string format starting with "T".relationstring
Parameter for filtering transactions where the queried account address is the sender or recipient.- from: Filter by sender only.
- to: Filter by recipient only.
- both (default): Returns all transactions where the queried address appears in from or to.
fromBlockstring
Parameter specifying the starting point for the query. You can enter block number, block hash, or block tag. Default is 0.- block number: Enter as a decimal string.
- block hash: Enter as a 64-character hexadecimal string, excluding the 0x prefix.
- block tag: You can enter "earliest" for fromBlock.
- If only fromBlock is provided without toBlock, results are queried from fromBlock to the most recent block.
- fromBlock's block number must be less than or equal to toBlock's block number.
- If toBlock and fromBlock have the same value, only that single block's results are queried.
- "latest" cannot be entered for fromBlock.
toBlockstring
Parameter specifying the ending point for the query. You can enter block number, block hash, or block tag. Default is "latest".- block number: Enter as a decimal string.
- block hash: Enter as a 64-character hexadecimal string, excluding the 0x prefix.
- block tag: You can enter "latest".
- The blockNumber for toBlock must be greater than or equal to the blockNumber for fromBlock.
- If toBlock and fromBlock have the same value, only that single block's results are queried.
- If only toBlock is provided without fromBlock, results are queried from genesis block to the time specified in toBlock.
- "earliest" cannot be entered for toBlock.
fromDatestring
Parameter specifying the start date for the query. Date must follow ISO 8601 format (YYYY-MM-DDThh:mm:ss{time zone}) including seconds.Notes:- If provided without toDate, results are queried from this date to the latest block.
- fromDate value must be equal to or earlier than toDate value.
- If fromDate and toDate have the same value, only blocks from that date are queried.
- This field cannot be used together with fromBlock and toBlock.
- If
fromDateandtoDateare not provided, the API queries data from the latest 30 days.
toDatestring
Parameter specifying the end date for the query. Date must follow ISO 8601 format (YYYY-MM-DDThh:mm:ss{time zone}) including seconds.Notes:- If provided without fromDate, results are queried from genesis block to this date.
- toDate value must be equal to or later than fromDate value.
- If fromDate and toDate have the same value, only blocks from that date are queried.
- This field cannot be used together with fromBlock and toBlock.
- If
fromDateandtoDateare not provided, the API queries data from the latest 30 days.
pageinteger
The page parameter specifies the data page to query. It accepts values up to 100; for pages exceeding 100, use the cursor pagination method.The page and cursor parameters cannot be used together. If both page and cursor are empty, cursor pagination is used.rppinteger
rpp stands for results per page and specifies the page size. You can specify a number greater than 0 and up to 100.cursorstring
The cursor parameter supports pagination and data navigation between pages. Provide the cursor value from the previous page in the next request to load the next page of data.The page and cursor parameters cannot be used together. If both page and cursor are empty, cursor pagination is used.withCountboolean
Parameter specifying whether to include the count field in the response. The count field indicates the total number of requested data items. When set to true, the count field is included and response speed may be slower.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
pageinteger
Field representing the page number specified in the page parameter. This field is only included in the response when a value greater than 0 is specified for the page parameter.rppinteger
Field representing the number of results per page specified in the rpp parameter.cursorstring
A field for cursor pagination. This value must be provided in the next request to load the next page of data.countinteger
Field representing the total count of requested data. This field is only included in the response when true is set for the withCount parameter.Field representing the actual range applied to the query. The same kind of values used in the request's range parameters are returned. A Date-based request returns fromDate and toDate, a Block-based request returns fromBlock and toBlock, and a Ledger-based request returns fromLedger and toLedger; different kinds are never mixed in a single response. When all range parameters are omitted, a default window of the last 30 days is applied and fromDate, toDate are returned. Block and Ledger values are always returned as heights (numbers), even if a hash or tag (latest, earliest) was provided in the request.
fromDatestring
Field representing the start of the query range in Date mode. Returned in ISO 8601 format.toDatestring
Field representing the end of the query range in Date mode. Returned in ISO 8601 format.fromBlockinteger
Field representing the start block height of the query range in Block mode.toBlockinteger
Field representing the end block height of the query range in Block mode.fromLedgerinteger
Field representing the start ledger index of the query range in Ledger mode.toLedgerinteger
Field representing the end ledger index of the query range in Ledger mode.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/getTransactionsByAccount' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"accountAddress": "T9123456789012345678901234567890123456789","relation": "both","fromBlock": "80453005","toBlock": "80453006","fromDate": "2025-01-01T00:00:00+00:00","toDate": "2025-01-31T00:00:00+00:00"}'