ManagedBlockchainQuery / Client / get_transaction

get_transaction#

ManagedBlockchainQuery.Client.get_transaction(**kwargs)#

Gets the details of a transaction.

Note

This action will return transaction details for all transactions that are confirmed on the blockchain, even if they have not reached finality.

See also: AWS API Documentation

Request Syntax

response = client.get_transaction(
    transactionHash='string',
    transactionId='string',
    network='ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET'
)
Parameters:
  • transactionHash (string) – The hash of a transaction. It is generated when a transaction is created.

  • transactionId (string) –

    The identifier of a Bitcoin transaction. It is generated when a transaction is created.

    Note

    transactionId is only supported on the Bitcoin networks.

  • network (string) –

    [REQUIRED]

    The blockchain network where the transaction occurred.

Return type:

dict

Returns:

Response Syntax

{
    'transaction': {
        'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET',
        'blockHash': 'string',
        'transactionHash': 'string',
        'blockNumber': 'string',
        'transactionTimestamp': datetime(2015, 1, 1),
        'transactionIndex': 123,
        'numberOfTransactions': 123,
        'to': 'string',
        'from': 'string',
        'contractAddress': 'string',
        'gasUsed': 'string',
        'cumulativeGasUsed': 'string',
        'effectiveGasPrice': 'string',
        'signatureV': 123,
        'signatureR': 'string',
        'signatureS': 'string',
        'transactionFee': 'string',
        'transactionId': 'string',
        'confirmationStatus': 'FINAL'|'NONFINAL',
        'executionStatus': 'FAILED'|'SUCCEEDED'
    }
}

Response Structure

  • (dict) –

    • transaction (dict) –

      Contains the details of the transaction.

      • network (string) –

        The blockchain network where the transaction occurred.

      • blockHash (string) –

        The block hash is a unique identifier for a block. It is a fixed-size string that is calculated by using the information in the block. The block hash is used to verify the integrity of the data in the block.

      • transactionHash (string) –

        The hash of a transaction. It is generated when a transaction is created.

      • blockNumber (string) –

        The block number in which the transaction is recorded.

      • transactionTimestamp (datetime) –

        The Timestamp of the transaction.

      • transactionIndex (integer) –

        The index of the transaction within a blockchain.

      • numberOfTransactions (integer) –

        The number of transactions in the block.

      • to (string) –

        The identifier of the transaction. It is generated whenever a transaction is verified and added to the blockchain.

      • from (string) –

        The initiator of the transaction. It is either in the form a public key or a contract address.

      • contractAddress (string) –

        The blockchain address for the contract.

      • gasUsed (string) –

        The amount of gas used for the transaction.

      • cumulativeGasUsed (string) –

        The amount of gas used up to the specified point in the block.

      • effectiveGasPrice (string) –

        The effective gas price.

      • signatureV (integer) –

        The signature of the transaction. The Z coordinate of a point V.

      • signatureR (string) –

        The signature of the transaction. The X coordinate of a point R.

      • signatureS (string) –

        The signature of the transaction. The Y coordinate of a point S.

      • transactionFee (string) –

        The transaction fee.

      • transactionId (string) –

        The identifier of a Bitcoin transaction. It is generated when a transaction is created.

      • confirmationStatus (string) –

        Specifies whether the transaction has reached Finality.

      • executionStatus (string) –

        Identifies whether the transaction has succeeded or failed.

Exceptions

  • ManagedBlockchainQuery.Client.exceptions.ThrottlingException

  • ManagedBlockchainQuery.Client.exceptions.ValidationException

  • ManagedBlockchainQuery.Client.exceptions.ResourceNotFoundException

  • ManagedBlockchainQuery.Client.exceptions.AccessDeniedException

  • ManagedBlockchainQuery.Client.exceptions.InternalServerException

  • ManagedBlockchainQuery.Client.exceptions.ServiceQuotaExceededException