Transactions
Overview
The Transactions endpoints in the Hedera Mirror Node REST API allows developers to query transaction history, details, and status on the Hedera network. These endpoints is essential for tracking payments, token transfers, smart contract executions, and other network activities.
Endpoints
The following endpoints are available for the Network activity object:
Endpoint
Description
GET /api/v1/transactions
Retrieves a list of transactions on the network.
GET /api/v1/transactions/{id}
Fetches details of a specific transaction by transaction ID.
Fetching Transactions
The transaction object represents the transactions processed on the Hedera network. You can retrieve this to view the transaction metadata information including transaction id, timestamp, transaction fee, transfer list, etc. If a transaction was submitted to multiple nodes, the successful transaction and duplicate transaction(s) will be returned as separate entries in the response with the same transaction ID. Duplicate transactions will still be assessed network fees.
List transactions
Lists transactions on the network. This includes successful and unsuccessful transactions.
/api/v1/transactions
The ID of the account to return information for
^((gte?|lte?|eq|ne)\:)?(\d{1,10}\.\d{1,10}\.)?\d{1,10}$
The maximum number of items to return
2
The order in which items are listed
asc
asc
, desc
The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See unixtimestamp.com for a simple way to convert a date to the 'seconds' part of the Unix time.
cryptotransfer
CONSENSUSCREATETOPIC
, CONSENSUSDELETETOPIC
, CONSENSUSSUBMITMESSAGE
, CONSENSUSUPDATETOPIC
, CONTRACTCALL
, CONTRACTCREATEINSTANCE
, CONTRACTDELETEINSTANCE
, CONTRACTUPDATEINSTANCE
, CRYPTOADDLIVEHASH
, CRYPTOAPPROVEALLOWANCE
, CRYPTOCREATEACCOUNT
, CRYPTODELETE
, CRYPTODELETEALLOWANCE
, CRYPTODELETELIVEHASH
, CRYPTOTRANSFER
, CRYPTOUPDATEACCOUNT
, ETHEREUMTRANSACTION
, FILEAPPEND
, FILECREATE
, FILEDELETE
, FILEUPDATE
, FREEZE
, NODE
, NODECREATE
, NODEDELETE
, NODESTAKEUPDATE
, NODEUPDATE
, SCHEDULECREATE
, SCHEDULEDELETE
, SCHEDULESIGN
, SYSTEMDELETE
, SYSTEMUNDELETE
, TOKENAIRDROP
, TOKENASSOCIATE
, TOKENBURN
, TOKENCANCELAIRDROP
, TOKENCLAIMAIRDROP
, TOKENCREATION
, TOKENDELETION
, TOKENDISSOCIATE
, TOKENFEESCHEDULEUPDATE
, TOKENFREEZE
, TOKENGRANTKYC
, TOKENMINT
, TOKENPAUSE
, TOKENREJECT
, TOKENREVOKEKYC
, TOKENUNFREEZE
, TOKENUNPAUSE
, TOKENUPDATE
, TOKENUPDATENFTS
, TOKENWIPE
, UNCHECKEDSUBMIT
, UNKNOWN
, UTILPRNG
The transaction success type.
success
, fail
The transaction account balance modification type.
credit
, debit
Get transaction by id
Returns transaction information based on the given transaction id
/api/v1/transactions/{transactionId}
Transaction id
0.0.10-1234567890-000000000
Filter the query result by the nonce of the transaction. A zero nonce represents user submitted transactions while a non-zero nonce is generated by main nodes. The filter honors the last value. If not specified, all transactions with specified payer account ID and valid start timestamp match. If multiple values are provided the last value will be the only value used.
0
Filter transactions by the scheduled flag. If true, return information for the scheduled transaction. If false, return information for the non-scheduled transaction. If not present, return information for all transactions matching transactionId. If multiple values are provided the last value will be the only value used.
Response Details
consensus timestamp
The consensus timestamp in seconds.nanoseconds
transaction hash
The hash value of the transaction processed on the Hedera network
valid start timestamp
The time the transaction is valid
charged tx fee
The transaction fee that was charged for that transaction
transaction id
The ID of the transaction
memo base64
The memo attached to the transaction encoded in Base64 format
result
Whether the cryptocurrency transaction was successful or not
entity ID
The entity ID that is created from create transactions (AccountCreateTransaction, TopicCreateTransaction, TokenCreateTransaction, ScheduleCreateTransaction, ContractCreateTransaction, FileCreateTransaction).
name
The type of transaction
max fee
The maximum transaction fee the client is willing to pay
valid duration seconds
The seconds for which a submitted transaction is to be deemed valid beyond the start time. The transaction is invalid if consensusTimestamp is greater than transactionValidStart + valid_duration_seconds.
node
The ID of the node that submitted the transaction to the network
transfers
A list of the account IDs the crypto transfer occurred between and the amount that was transferred. A negative (-) sign indicates a debit to that account. The transfer list includes the transfers between the from account and to account, the transfer of the node fee, the transfer of the network fee, and the transfer of the service fee for that transaction. If the transaction was not processed, a network fee is still assessed.
token transfers
The token ID, account, and amount that was transferred to by this account in this transaction. This will not be listed if it did not occur in the transaction
assessed custom fees
The fees that were charged for a custom fee token transfer
links.next
A hyperlink to the next page of responses
Optional Filtering
lt
(less than)
/api/v1/transactions?account.id=lt:0.0.1000
Returns account.id transactions less than 1,000
lte
(less than or equal to)
/api/v1/transactions?account.id=lte:0.0.1000
Returns account.id transactions less than or equal to 1,000
gt
(greater than)
/api/v1/transactions?account.id=gt:0.0.1000
Returns account.id transactions greater than 1,000
gte
(greater than or equal to)
api/v1/transactions?account.id=gte:0.0.1000
Returns account.id transactions greater than or equal to 1,000
order
(order asc
or desc
values)
/api/v1/transactions?order=asc
/api/v1/transactions?order=desc
Lists transactions in ascending order Lists transactions descending order
Note: It is recommended that the account.id query should not select no more than 1000 accounts in a query. If the range specified in the query results in selecting more than 1000 accounts, the API will automatically only search for the first 1000 accounts that match the query in the database and return the transactions for those. For example, if you use ?account.id=gt:0.0.15000
or if you use?account.id=gt:0.0.15000&account.id=lt:0.0.30000
, then the API will only return results or some 1000 accounts in this range that match the rest of the query filters.
A single transaction can also be returned by specifying the transaction ID in the request. If a transaction was submitted to multiple nodes, the response will return entries for the successful transaction along with separate entries for the duplicate transaction(s). The "result" key indicates "success" for the node that processed the transaction and "DUPLICATE_TRANSACTION" for each additional node submission. Duplicate entries are still charged network fees.
{transaction_ID}
A specific transaction can be returned by specifying a transaction ID
Additional Examples
/api/v1/transactions/?account.id=0.0.1000
Returns transaction for account ID 1,000
/api/v1/transactions?timestamp=1565779209.711927001
Returns transactions at 1565779209 seconds and 711927001 nanoseconds
/api/v1/transactions?result=fail
Returns all transactions that have failed
/api/v1/transactions?account.id=0.0.13622&type=credit
/api/v1/transactions?account.id=0.0.13622&type=debit
Returns all transactions that deposited into an account ID 0.0.13622
Returns all transactions that withdrew from account ID 0.0.13622
/api/v1/transactions?transactionType=cryptotransfer
Returns all cryptotransfer transactions
Last updated
Was this helpful?