/v1/transactions/by_version/{version}

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

Supported Network

  • Mainnet

Parameter

ParameterData typeDescriptionRequiredIn
versionintegerThe ledger versionYesPath
with_transactionsbooleanTo contain transactions' details or notnoQuery

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/3556737308?with_transactions=false'

Response Example

json{
    "block_height": "456015808",
    "block_hash": "0xdbe2cbd48ec3b897fa5f6b1ff51bd8eef280e300e12b6ff153b3959a7440a268",
    "block_timestamp": "1760341227055115",
    "first_version": "3556737303",
    "last_version": "3556737309",
    "transactions": null
}

Response Parameter Definition

FieldTypeDescription
block_heightstringHeight of the block in the blockchain.
block_hashstringUnique hash identifying the block.
block_timestampstringTimestamp (in microseconds) when the block was created.
first_versionstringFirst transaction version included in this block.
last_versionstringLast transaction version included in this block.
transactionsobjectsList of transactions contained in this block.
transactions.typestringType of the transaction (e.g., user_transaction, block_metadata_transaction).
transactions.hashstringUnique hash identifying the transaction.
transactions.senderstringAccount address that initiated the transaction.
transactions.sequence_numberstringThe sender’s sequence number for this transaction.
transactions.max_gas_amountstringMaximum gas units the sender is willing to spend.
transactions.gas_unit_pricestringGas price per unit.
transactions.expiration_timestamp_secsstringExpiration timestamp (in seconds) after which the transaction becomes invalid.
transactions.payloadobjectPayload object describing the action being executed.
transactions.payload.typestringType of payload (e.g., entry_function_payload).
transactions.payload.functionstringFunction name being called (e.g., 0x1::coin::transfer).
transactions.payload.type_argumentsarrayType arguments for the function (e.g., token types).
transactions.payload.argumentsarrayArguments passed to the function (e.g., recipient address, amount).
transactions.signatureobjectSignature object verifying the transaction.
transactions.signature.typestringType of cryptographic signature (e.g., ed25519_signature).
transactions.signature.public_keystringPublic key of the sender.
transactions.signature.signaturestringCryptographic signature validating the 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/3363904007',
};

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/3363904007'

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.