/v1/transactions/by_version/{version} - Aptos

This endpoint gets a transaction by its ledger version number from Aptos blockchain.

supported Network

  • Mainnet

Parameter

ParameterData typeDescriptionRequiredIn
versionintegerThe ledger versionYesPath

Request

Base URL

bashhttps://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>

Example(cURL)

curlcurl --location 'https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>/v1/transactions/by_version/3363904007'

Response Example

json{
    "version": "3363904007",
    "hash": "0xd797b944ed8657406a1b09a5928048093399fc0a2f576d3e57c0f9cedbf95c4a",
    "state_change_hash": "0xafb6e14fe47d850fd0a7395bcfb997ffacf4715e0f895cc162c218e4a7564bc6",
    "event_root_hash": "0x414343554d554c41544f525f504c414345484f4c4445525f4841534800000000",
    "state_checkpoint_hash": "0xbf257d934f991d1e7d74079cc9060d3ac005aaa208d93a1fd4928dfc224bba53",
    "gas_used": "0",
    "success": true,
    "vm_status": "Executed successfully",
    "accumulator_root_hash": "0xc985314d5c118899c649b772c237178c63f328e7d286aceea01a30373d491d95",
    "changes": [],
    "timestamp": "1757261767411156",
    "block_end_info": {
        "block_gas_limit_reached": false,
        "block_output_limit_reached": false,
        "block_effective_block_gas_units": 500,
        "block_approx_output_size": 21541
    },
    "type": "block_epilogue_transaction"
}

Response Parameter Definition

FieldTypeDescription
versionStringGlobal transaction version number.
hashStringHash of the transaction.
state_change_hashStringHash of all state changes from this txn.
event_root_hashStringMerkle root hash of all events.
state_checkpoint_hashStringHash of the state checkpoint.
gas_usedStringAmount of gas consumed.
successBooleanWhether transaction executed successfully.
vm_statusStringResult status from Aptos VM.
accumulator_root_hashStringGlobal accumulator root hash.
changesArrayState changes applied (empty for system txns).
timestampStringUnix timestamp in microseconds.
block_end_infoObjectMetadata about block execution.
block_end_info.block_gas_limit_reachedBooleabBlock’s gas limit was reached.
block_end_info.block_output_limit_reachedBooleanBlock’s output size limit was hit.
block_end_info.block_effective_block_gas_unitsIntegerEffective gas used in this block.
block_end_info.block_approx_output_sizeIntergerApproximate output size of block in bytes.
typeStringTransaction type (e.g., user_transaction, block_epilogue_transaction).

Use cases

This method is used for:

  • Retrieve details of a specific transaction by its version.
  • Debug failed transactions by checking vm_status.
  • Build explorers that let users search transactions by version.
  • Track system-level transactions like block epilogues.

Code Example

Node(axios)

jsconst axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>/v1/transactions/by_version/3541136893',
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

Python(Request)

pythonimport requests

url = "https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>/v1/transactions/by_version/3541136893"

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Error handling

Status CodeError MessageCause
403forbiddenMissing or invalid <ACCESS_TOKEN>.
410Ledger version has been prunedIncorrect version number or being pruned
500Internal server errorNode or network issue; retry later.

Integration with Web3

By integrating /v1/transactions/by_version/{version}, developers can:

  • Trace exact transactions for auditing or compliance.
  • Debug dApps by fetching execution results and state changes.
  • Enable explorers to link transactions with block details. Monitor validators/system txns like block prologues and epilogues.