Get Transaction by Hash
Look up a transaction by its hash.
This method will use 15 Compute Units.
Look up a transaction by its hash. This is the same hash that is returned by the API when submitting a transaction (see PendingTransaction).
When given a transaction hash, the server first looks for the transaction in storage (on-chain, committed). If no on-chain transaction is found, it looks the transaction up by hash in the mempool (pending, not yet committed).
To create a transaction hash by yourself, do the following:
- Hash message bytes: "RawTransaction" bytes + BCS bytes of Transaction.
- Apply hash algorithm
SHA3-256to the hash message bytes. - Hex-encode the hash bytes with
0xprefix.
Path parameters
txn_hashstringRequired
Hash of transaction to retrieve
Responses
200Success
Responseone of
Enum of the different types of transactions in Aptos
or
or
or
or
400Error
application/json
403Error
application/json
404Error
application/json
410Error
application/json
500Error
application/json
503Error
application/json
get
/transactions/by_hash/{txn_hash}Last updated
Was this helpful?