Movement Labs LogoMovement Docs
Node API

Get transaction by hash

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:

  1. Hash message bytes: "RawTransaction" bytes + BCS bytes of Transaction.
  2. Apply hash algorithm SHA3-256 to the hash message bytes.
  3. Hex-encode the hash bytes with 0x prefix.
GET
/transactions/by_hash/{txn_hash}

Path Parameters

txn_hashstring

Hash of transaction to retrieve

Response Body

curl -X GET "https://full.mainnet.movementinfra.xyz/v1/transactions/by_hash/string"
{
  "type": "pending_transaction",
  "hash": "string",
  "sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
  "sequence_number": "32425224034",
  "max_gas_amount": "32425224034",
  "gas_unit_price": "32425224034",
  "expiration_timestamp_secs": "32425224034",
  "payload": {
    "type": "entry_function_payload",
    "function": "0x1::aptos_coin::transfer",
    "type_arguments": [
      "string"
    ],
    "arguments": [
      null
    ]
  },
  "signature": {
    "type": "ed25519_signature",
    "public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
    "signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
  }
}
{
  "message": "string",
  "error_code": "account_not_found",
  "vm_error_code": 0
}
{
  "message": "string",
  "error_code": "account_not_found",
  "vm_error_code": 0
}
{
  "message": "string",
  "error_code": "account_not_found",
  "vm_error_code": 0
}
{
  "message": "string",
  "error_code": "account_not_found",
  "vm_error_code": 0
}
{
  "message": "string",
  "error_code": "account_not_found",
  "vm_error_code": 0
}
{
  "message": "string",
  "error_code": "account_not_found",
  "vm_error_code": 0
}