Get transaction by hash
GET/transactions/by_hash/:txn_hash
Retrieves a transaction by its hash. This hash is the same value returned by the API when submitting a transaction (Pending Transaction).
How to generate a transaction hash directly:
- Create message bytes: concatenate "RawTransaction" bytes + the transaction's BCS bytes
- Apply the SHA3-256 hash algorithm to the message bytes
- Encode the hashed bytes as a hex string with the 0x prefix
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 410
- 429
Successful Response
Response Headers
X-APTOS-BLOCK-HEIGHT
Current block height of the chain
X-APTOS-CHAIN-ID
Chain ID of the current chain
X-APTOS-EPOCH
Current epoch of the chain
X-APTOS-LEDGER-OLDEST-VERSION
Oldest unpruned ledger version of the chain
X-APTOS-LEDGER-TIMESTAMPUSEC
Current timestamp of the chain
X-APTOS-LEDGER-VERSION
Current ledger version of the chain
X-APTOS-OLDEST-BLOCK-HEIGHT
Oldest unpruned block height of the chain
X-APTOS-CURSOR
Cursor for the next page
X-APTOS-GAS-USED
Amount of gas actually used for transaction execution
Bad Request
Unauthorized
Forbidden
Not Found
Block Pruned
Too Many Requests