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'|'BITCOIN_MAINNET'
)
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'|'BITCOIN_MAINNET',
        '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'
    }
}

Response Structure

  • (dict) –

    • transaction (dict) –

      Contains the details of the transaction.

      • network (string) –

        The blockchain network where the transaction occured.

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

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

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