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.

get

/api/v1/transactions

Query parameters
account.idstring

The ID of the account to return information for

Pattern: ^((gte?|lte?|eq|ne)\:)?(\d{1,10}\.\d{1,10}\.)?\d{1,10}$
limitinteger int32

The maximum number of items to return

Example: 2
orderenum

The order in which items are listed

Example: asc
Options: asc, desc
timestampstring[]

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.

transactiontypeenum
Example: cryptotransfer
Options: 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
resultenum

The transaction success type.

Options: success, fail
typeenum

The transaction account balance modification type.

Options: credit, debit
Responses
curl -L \
  --url '/api/v1/transactions'
{
  "transactions": [
    {
      "bytes": null,
      "charged_tx_fee": 7,
      "consensus_timestamp": "1234567890.000000007",
      "entity_id": "0.0.2281979",
      "max_fee": 33,
      "memo_base64": null,
      "name": "CRYPTOTRANSFER",
      "node": "0.0.3",
      "nonce": 0,
      "parent_consensus_timestamp": "1234567890.000000007",
      "result": "SUCCESS",
      "scheduled": false,
      "transaction_hash": "vigzKe2J7fv4ktHBbNTSzQmKq7Lzdq1/lJMmHT+a2KgvdhAuadlvS4eKeqKjIRmW",
      "transaction_id": "0.0.8-1234567890-000000006",
      "valid_duration_seconds": 11,
      "valid_start_timestamp": "1234567890.000000006",
      "nft_transfers": [
        {
          "is_approval": true,
          "receiver_account_id": "0.0.121",
          "sender_account_id": "0.0.122",
          "serial_number": 1,
          "token_id": "0.0.123"
        },
        {
          "is_approval": true,
          "receiver_account_id": "0.0.321",
          "sender_account_id": "0.0.422",
          "serial_number": 2,
          "token_id": "0.0.123"
        }
      ],
      "staking_reward_transfers": [
        {
          "account": 3,
          "amount": 150
        },
        {
          "account": 9,
          "amount": 200
        }
      ],
      "token_transfers": [
        {
          "token_id": "0.0.90000",
          "account": "0.0.9",
          "amount": 1200,
          "is_approval": false
        },
        {
          "token_id": "0.0.90000",
          "account": "0.0.8",
          "amount": -1200,
          "is_approval": false
        }
      ],
      "transfers": [
        {
          "account": "0.0.3",
          "amount": 2,
          "is_approval": false
        },
        {
          "account": "0.0.8",
          "amount": -3,
          "is_approval": false
        },
        {
          "account": "0.0.98",
          "amount": 1,
          "is_approval": false
        },
        {
          "account": "0.0.800",
          "amount": 150,
          "is_approval": false
        },
        {
          "account": "0.0.800",
          "amount": 200,
          "is_approval": false
        }
      ]
    }
  ],
  "links": {
    "next": null
  }
}

Get transaction by id

Returns transaction information based on the given transaction id

get

/api/v1/transactions/{transactionId}

Path parameters
transactionIdstringrequired

Transaction id

Example: 0.0.10-1234567890-000000000
Query parameters
nonceinteger int32

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.

Example: 0
scheduledboolean

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.

Responses
curl -L \
  --url '/api/v1/transactions/{transactionId}'
{
  "transactions": [
    {
      "bytes": null,
      "charged_tx_fee": 7,
      "consensus_timestamp": "1234567890.000000007",
      "entity_id": "0.0.2281979",
      "max_fee": 33,
      "memo_base64": null,
      "name": "CRYPTOTRANSFER",
      "node": "0.0.3",
      "nonce": 0,
      "parent_consensus_timestamp": "1234567890.000000007",
      "result": "SUCCESS",
      "scheduled": false,
      "transaction_hash": "vigzKe2J7fv4ktHBbNTSzQmKq7Lzdq1/lJMmHT+a2KgvdhAuadlvS4eKeqKjIRmW",
      "transaction_id": "0.0.8-1234567890-000000006",
      "valid_duration_seconds": 11,
      "valid_start_timestamp": "1234567890.000000006",
      "nft_transfers": [
        {
          "is_approval": true,
          "receiver_account_id": "0.0.121",
          "sender_account_id": "0.0.122",
          "serial_number": 1,
          "token_id": "0.0.123"
        },
        {
          "is_approval": true,
          "receiver_account_id": "0.0.321",
          "sender_account_id": "0.0.422",
          "serial_number": 2,
          "token_id": "0.0.123"
        }
      ],
      "staking_reward_transfers": [
        {
          "account": 3,
          "amount": 150
        },
        {
          "account": 9,
          "amount": 200
        }
      ],
      "token_transfers": [
        {
          "token_id": "0.0.90000",
          "account": "0.0.9",
          "amount": 1200,
          "is_approval": false
        },
        {
          "token_id": "0.0.90000",
          "account": "0.0.8",
          "amount": -1200,
          "is_approval": false
        }
      ],
      "transfers": [
        {
          "account": "0.0.3",
          "amount": 2,
          "is_approval": false
        },
        {
          "account": "0.0.8",
          "amount": -3,
          "is_approval": false
        },
        {
          "account": "0.0.98",
          "amount": 1,
          "is_approval": false
        },
        {
          "account": "0.0.800",
          "amount": 150,
          "is_approval": false
        },
        {
          "account": "0.0.800",
          "amount": 200,
          "is_approval": false
        }
      ],
      "assessed_custom_fees": [
        {
          "amount": 1,
          "collector_account_id": "0.0.2",
          "token_id": "0.0.2",
          "effective_payer_account_ids": [
            "0.0.2"
          ]
        }
      ]
    }
  ]
}

Response Details

Response Item
Description

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

Operator
Example
Description

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.

Parameter
Description

{transaction_ID}

A specific transaction can be returned by specifying a transaction ID

Additional Examples

Example Request
Description

/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?