ManagedBlockchainQuery / Client / get_transaction

get_transaction#

ManagedBlockchainQuery.Client.get_transaction(**kwargs)#

Get the details of a transaction.

See also: AWS API Documentation

Request Syntax

response = client.get_transaction(
    transactionHash='string',
    network='ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET'
)
Parameters:
  • transactionHash (string) –

    [REQUIRED]

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

  • 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,
        'status': 'FINAL'|'FAILED',
        'to': 'string',
        'from': 'string',
        'contractAddress': 'string',
        'gasUsed': 'string',
        'cumulativeGasUsed': 'string',
        'effectiveGasPrice': 'string',
        'signatureV': 123,
        'signatureR': 'string',
        'signatureS': 'string',
        'transactionFee': 'string',
        'transactionId': 'string',
        'confirmationStatus': 'FINAL',
        '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 the transaction. It is generated whenever a transaction is verified and added to the blockchain.

      • 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.

      • status (string) –

        The status of the transaction.

        Warning

        This property is deprecated. You must use the confirmationStatus and the executionStatus properties to determine if the status of the transaction is FINAL or FAILED.

        • Transactions with a status of FINAL will now have the confirmationStatus set to FINAL and the executionStatus set to SUCCEEDED.

        • Transactions with a status of FAILED will now have the confirmationStatus set to FINAL and the executionStatus set to FAILED.

      • 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 unique identifier of the transaction. It is generated whenever a transaction is verified and added to the blockchain.

      • 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