Amazon Managed Blockchain Query

2024/03/19 - Amazon Managed Blockchain Query - 1 new1 updated api methods

Changes  Introduces a new API for Amazon Managed Blockchain Query: ListFilteredTransactionEvents.

ListFilteredTransactionEvents (new) Link ¶

Lists all the transaction events for an address on the blockchain.

See also: AWS API Documentation

Request Syntax

client.list_filtered_transaction_events(
    network='string',
    addressIdentifierFilter={
        'transactionEventToAddress': [
            'string',
        ]
    },
    timeFilter={
        'from': {
            'time': datetime(2015, 1, 1)
        },
        'to': {
            'time': datetime(2015, 1, 1)
        }
    },
    voutFilter={
        'voutSpent': True|False
    },
    confirmationStatusFilter={
        'include': [
            'FINAL'|'NONFINAL',
        ]
    },
    sort={
        'sortBy': 'blockchainInstant',
        'sortOrder': 'ASCENDING'|'DESCENDING'
    },
    nextToken='string',
    maxResults=123
)
type network:

string

param network:

[REQUIRED]

The blockchain network where the transaction occurred.

Valid Values: BITCOIN_MAINNET | BITCOIN_TESTNET

type addressIdentifierFilter:

dict

param addressIdentifierFilter:

[REQUIRED]

This is the unique public address on the blockchain for which the transaction events are being requested.

  • transactionEventToAddress (list) -- [REQUIRED]

    The container for the recipient address of the transaction.

    • (string) --

type timeFilter:

dict

param timeFilter:

This container specifies the time frame for the transaction events returned in the response.

  • from (dict) --

    The container for time.

    • time (datetime) --

      The container of the Timestamp of the blockchain instant.

  • to (dict) --

    The container for time.

    • time (datetime) --

      The container of the Timestamp of the blockchain instant.

type voutFilter:

dict

param voutFilter:

This container specifies filtering attributes related to BITCOIN_VOUT event types

  • voutSpent (boolean) -- [REQUIRED]

    Specifies if the transaction output is spent or unspent.

type confirmationStatusFilter:

dict

param confirmationStatusFilter:

The container for the ConfirmationStatusFilter that filters for the finality of the results.

  • include (list) -- [REQUIRED]

    The container to determine whether to list results that have only reached finality. Transactions that have reached finality are always part of the response.

    • (string) --

type sort:

dict

param sort:

The order by which the results will be sorted.

  • sortBy (string) --

    Container on how the results will be sorted by?

  • sortOrder (string) --

    The container for the sort order for ListFilteredTransactionEvents. The SortOrder field only accepts the values ASCENDING and DESCENDING. Not providing SortOrder will default to ASCENDING.

type nextToken:

string

param nextToken:

The pagination token that indicates the next set of results to retrieve.

type maxResults:

integer

param maxResults:

The maximum number of transaction events to list.

Default: 100

rtype:

dict

returns:

Response Syntax

{
    'events': [
        {
            'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET',
            'transactionHash': 'string',
            'eventType': 'ERC20_TRANSFER'|'ERC20_MINT'|'ERC20_BURN'|'ERC20_DEPOSIT'|'ERC20_WITHDRAWAL'|'ERC721_TRANSFER'|'ERC1155_TRANSFER'|'BITCOIN_VIN'|'BITCOIN_VOUT'|'INTERNAL_ETH_TRANSFER'|'ETH_TRANSFER',
            'from': 'string',
            'to': 'string',
            'value': 'string',
            'contractAddress': 'string',
            'tokenId': 'string',
            'transactionId': 'string',
            'voutIndex': 123,
            'voutSpent': True|False,
            'spentVoutTransactionId': 'string',
            'spentVoutTransactionHash': 'string',
            'spentVoutIndex': 123,
            'blockchainInstant': {
                'time': datetime(2015, 1, 1)
            },
            'confirmationStatus': 'FINAL'|'NONFINAL'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • events (list) --

      The transaction events returned by the request.

      • (dict) --

        The container for the properties of a transaction event.

        • network (string) --

          The blockchain network where the transaction occurred.

        • transactionHash (string) --

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

        • eventType (string) --

          The type of transaction event.

        • from (string) --

          The wallet address initiating the transaction. It can either be a public key or a contract.

        • to (string) --

          The wallet address receiving the transaction. It can either be a public key or a contract.

        • value (string) --

          The value that was transacted.

        • contractAddress (string) --

          The blockchain address for the contract

        • tokenId (string) --

          The unique identifier for the token involved in the transaction.

        • transactionId (string) --

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

        • voutIndex (integer) --

          The position of the transaction output in the transaction output list.

        • voutSpent (boolean) --

          Specifies if the transaction output is spent or unspent. This is only returned for BITCOIN_VOUT event types.

        • spentVoutTransactionId (string) --

          The transactionId that created the spent transaction output.

        • spentVoutTransactionHash (string) --

          The transactionHash that created the spent transaction output.

        • spentVoutIndex (integer) --

          The position of the spent transaction output in the output list of the creating transaction.

        • blockchainInstant (dict) --

          The container for time.

          • time (datetime) --

            The container of the Timestamp of the blockchain instant.

        • confirmationStatus (string) --

          This container specifies whether the transaction has reached Finality.

    • nextToken (string) --

      The pagination token that indicates the next set of results to retrieve.

ListTransactionEvents (updated) Link ¶
Changes (request, response)
Request
{'transactionId': 'string'}
Response
{'events': {'blockchainInstant': {'time': 'timestamp'},
            'confirmationStatus': 'FINAL | NONFINAL',
            'spentVoutIndex': 'integer',
            'spentVoutTransactionHash': 'string',
            'spentVoutTransactionId': 'string',
            'voutSpent': 'boolean'}}

Lists all the transaction events for a transaction

See also: AWS API Documentation

Request Syntax

client.list_transaction_events(
    transactionHash='string',
    transactionId='string',
    network='ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET',
    nextToken='string',
    maxResults=123
)
type transactionHash:

string

param transactionHash:

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

type transactionId:

string

param transactionId:

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

type network:

string

param network:

[REQUIRED]

The blockchain network where the transaction events occurred.

type nextToken:

string

param nextToken:

The pagination token that indicates the next set of results to retrieve.

type maxResults:

integer

param maxResults:

The maximum number of transaction events to list.

Default: 100

rtype:

dict

returns:

Response Syntax

{
    'events': [
        {
            'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET',
            'transactionHash': 'string',
            'eventType': 'ERC20_TRANSFER'|'ERC20_MINT'|'ERC20_BURN'|'ERC20_DEPOSIT'|'ERC20_WITHDRAWAL'|'ERC721_TRANSFER'|'ERC1155_TRANSFER'|'BITCOIN_VIN'|'BITCOIN_VOUT'|'INTERNAL_ETH_TRANSFER'|'ETH_TRANSFER',
            'from': 'string',
            'to': 'string',
            'value': 'string',
            'contractAddress': 'string',
            'tokenId': 'string',
            'transactionId': 'string',
            'voutIndex': 123,
            'voutSpent': True|False,
            'spentVoutTransactionId': 'string',
            'spentVoutTransactionHash': 'string',
            'spentVoutIndex': 123,
            'blockchainInstant': {
                'time': datetime(2015, 1, 1)
            },
            'confirmationStatus': 'FINAL'|'NONFINAL'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • events (list) --

      An array of TransactionEvent objects. Each object contains details about the transaction events.

      • (dict) --

        The container for the properties of a transaction event.

        • network (string) --

          The blockchain network where the transaction occurred.

        • transactionHash (string) --

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

        • eventType (string) --

          The type of transaction event.

        • from (string) --

          The wallet address initiating the transaction. It can either be a public key or a contract.

        • to (string) --

          The wallet address receiving the transaction. It can either be a public key or a contract.

        • value (string) --

          The value that was transacted.

        • contractAddress (string) --

          The blockchain address for the contract

        • tokenId (string) --

          The unique identifier for the token involved in the transaction.

        • transactionId (string) --

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

        • voutIndex (integer) --

          The position of the transaction output in the transaction output list.

        • voutSpent (boolean) --

          Specifies if the transaction output is spent or unspent. This is only returned for BITCOIN_VOUT event types.

        • spentVoutTransactionId (string) --

          The transactionId that created the spent transaction output.

        • spentVoutTransactionHash (string) --

          The transactionHash that created the spent transaction output.

        • spentVoutIndex (integer) --

          The position of the spent transaction output in the output list of the creating transaction.

        • blockchainInstant (dict) --

          The container for time.

          • time (datetime) --

            The container of the Timestamp of the blockchain instant.

        • confirmationStatus (string) --

          This container specifies whether the transaction has reached Finality.

    • nextToken (string) --

      The pagination token that indicates the next set of results to retrieve.