ManagedBlockchainQuery ********************** Client ====== class ManagedBlockchainQuery.Client A low-level client representing Amazon Managed Blockchain Query Amazon Managed Blockchain (AMB) Query provides you with convenient access to multi-blockchain network data, which makes it easier for you to extract contextual data related to blockchain activity. You can use AMB Query to read data from public blockchain networks, such as Bitcoin Mainnet and Ethereum Mainnet. You can also get information such as the current and historical balances of addresses, or you can get a list of blockchain transactions for a given time period. Additionally, you can get details of a given transaction, such as transaction events, which you can further analyze or use in business logic for your applications. import boto3 client = boto3.client('managedblockchain-query') These are the available methods: * batch_get_token_balance * can_paginate * close * get_asset_contract * get_paginator * get_token_balance * get_transaction * get_waiter * list_asset_contracts * list_filtered_transaction_events * list_token_balances * list_transaction_events * list_transactions Paginators ========== Paginators are available on a client instance via the "get_paginator" method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide. The available paginators are: * ListAssetContracts * ListFilteredTransactionEvents * ListTokenBalances * ListTransactionEvents * ListTransactions ManagedBlockchainQuery / Paginator / ListTransactions ListTransactions **************** class ManagedBlockchainQuery.Paginator.ListTransactions paginator = client.get_paginator('list_transactions') paginate(**kwargs) Creates an iterator that will paginate through responses from "ManagedBlockchainQuery.Client.list_transactions()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( address='string', network='ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', fromBlockchainInstant={ 'time': datetime(2015, 1, 1) }, toBlockchainInstant={ 'time': datetime(2015, 1, 1) }, sort={ 'sortBy': 'TRANSACTION_TIMESTAMP', 'sortOrder': 'ASCENDING'|'DESCENDING' }, confirmationStatusFilter={ 'include': [ 'FINAL'|'NONFINAL', ] }, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **address** (*string*) -- **[REQUIRED]** The address (either a contract or wallet), whose transactions are being requested. * **network** (*string*) -- **[REQUIRED]** The blockchain network where the transactions occurred. * **fromBlockchainInstant** (*dict*) -- The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **toBlockchainInstant** (*dict*) -- The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **sort** (*dict*) -- The order by which the results will be sorted. * **sortBy** *(string) --* Defaults to the value "TRANSACTION_TIMESTAMP". * **sortOrder** *(string) --* The container for the *sort order* for "ListTransactions". The "SortOrder" field only accepts the values "ASCENDING" and "DESCENDING". Not providing "SortOrder" will default to "ASCENDING". * **confirmationStatusFilter** (*dict*) -- This filter is used to include transactions in the response that haven't reached finality. Transactions that have reached finality are always part of the response. * **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) --* * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'transactions': [ { 'transactionHash': 'string', 'transactionId': 'string', 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'transactionTimestamp': datetime(2015, 1, 1), 'confirmationStatus': 'FINAL'|'NONFINAL' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **transactions** *(list) --* The array of transactions returned by the request. * *(dict) --* The container of the transaction output. * **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. * **network** *(string) --* The blockchain network where the transaction occurred. * **transactionTimestamp** *(datetime) --* The time when the transaction occurred. * **confirmationStatus** *(string) --* Specifies whether to list transactions that have not reached Finality. * **NextToken** *(string) --* A token to resume pagination. ManagedBlockchainQuery / Paginator / ListTransactionEvents ListTransactionEvents ********************* class ManagedBlockchainQuery.Paginator.ListTransactionEvents paginator = client.get_paginator('list_transaction_events') paginate(**kwargs) Creates an iterator that will paginate through responses from "ManagedBlockchainQuery.Client.list_transaction_events()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( transactionHash='string', transactionId='string', network='ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) 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 events occurred. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: 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. Note: This is only returned for "BITCOIN_VOUT" event types. * **spentVoutTransactionId** *(string) --* The transactionId that *created* the spent transaction output. Note: This is only returned for "BITCOIN_VIN" event types. * **spentVoutTransactionHash** *(string) --* The transactionHash that *created* the spent transaction output. Note: This is only returned for "BITCOIN_VIN" event types. * **spentVoutIndex** *(integer) --* The position of the spent transaction output in the output list of the *creating transaction*. Note: This is only returned for "BITCOIN_VIN" event types. * **blockchainInstant** *(dict) --* The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **confirmationStatus** *(string) --* This container specifies whether the transaction has reached Finality. * **NextToken** *(string) --* A token to resume pagination. ManagedBlockchainQuery / Paginator / ListAssetContracts ListAssetContracts ****************** class ManagedBlockchainQuery.Paginator.ListAssetContracts paginator = client.get_paginator('list_asset_contracts') paginate(**kwargs) Creates an iterator that will paginate through responses from "ManagedBlockchainQuery.Client.list_asset_contracts()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( contractFilter={ 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'tokenStandard': 'ERC20'|'ERC721'|'ERC1155', 'deployerAddress': 'string' }, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **contractFilter** (*dict*) -- **[REQUIRED]** Contains the filter parameter for the request. * **network** *(string) --* **[REQUIRED]** The blockchain network of the contract. * **tokenStandard** *(string) --* **[REQUIRED]** The container for the token standard. * **deployerAddress** *(string) --* **[REQUIRED]** The network address of the deployer. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'contracts': [ { 'contractIdentifier': { 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string' }, 'tokenStandard': 'ERC20'|'ERC721'|'ERC1155', 'deployerAddress': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **contracts** *(list) --* An array of contract objects that contain the properties for each contract. * *(dict) --* This container contains information about an contract. * **contractIdentifier** *(dict) --* The container for the contract identifier containing its blockchain network and address. * **network** *(string) --* The blockchain network of the contract. * **contractAddress** *(string) --* Container for the blockchain address about a contract. * **tokenStandard** *(string) --* The token standard of the contract. * **deployerAddress** *(string) --* The address of the contract deployer. * **NextToken** *(string) --* A token to resume pagination. ManagedBlockchainQuery / Paginator / ListTokenBalances ListTokenBalances ***************** class ManagedBlockchainQuery.Paginator.ListTokenBalances paginator = client.get_paginator('list_token_balances') paginate(**kwargs) Creates an iterator that will paginate through responses from "ManagedBlockchainQuery.Client.list_token_balances()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( ownerFilter={ 'address': 'string' }, tokenFilter={ 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string', 'tokenId': 'string' }, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **ownerFilter** (*dict*) -- The contract or wallet address on the blockchain network by which to filter the request. You must specify the "address" property of the "ownerFilter" when listing balances of tokens owned by the address. * **address** *(string) --* **[REQUIRED]** The contract or wallet address. * **tokenFilter** (*dict*) -- **[REQUIRED]** The contract address or a token identifier on the blockchain network by which to filter the request. You must specify the "contractAddress" property of this container when listing tokens minted by a contract. Note: You must always specify the network property of this container when using this operation. * **network** *(string) --* **[REQUIRED]** The blockchain network of the token. * **contractAddress** *(string) --* This is the address of the contract. * **tokenId** *(string) --* The unique identifier of the token. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'tokenBalances': [ { 'ownerIdentifier': { 'address': 'string' }, 'tokenIdentifier': { 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string', 'tokenId': 'string' }, 'balance': 'string', 'atBlockchainInstant': { 'time': datetime(2015, 1, 1) }, 'lastUpdatedTime': { 'time': datetime(2015, 1, 1) } }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **tokenBalances** *(list) --* An array of "TokenBalance" objects. Each object contains details about the token balance. * *(dict) --* The balance of the token. * **ownerIdentifier** *(dict) --* The container for the identifier of the owner. * **address** *(string) --* The contract or wallet address for the owner. * **tokenIdentifier** *(dict) --* The identifier for the token, including the unique token ID and its blockchain network. * **network** *(string) --* The blockchain network of the token. * **contractAddress** *(string) --* This is the token's contract address. * **tokenId** *(string) --* The unique identifier of the token. Note: For native tokens, use the 3 character abbreviation that best matches your token. For example, btc for Bitcoin, eth for Ether, etc. For all other token types you must specify the "tokenId" in the 64 character hexadecimal "tokenid" format. * **balance** *(string) --* The container of the token balance. * **atBlockchainInstant** *(dict) --* The time for when the TokenBalance is requested or the current time if a time is not provided in the request. Note: This time will only be recorded up to the second. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **lastUpdatedTime** *(dict) --* The "Timestamp" of the last transaction at which the balance for the token in the wallet was updated. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **NextToken** *(string) --* A token to resume pagination. ManagedBlockchainQuery / Paginator / ListFilteredTransactionEvents ListFilteredTransactionEvents ***************************** class ManagedBlockchainQuery.Paginator.ListFilteredTransactionEvents paginator = client.get_paginator('list_filtered_transaction_events') paginate(**kwargs) Creates an iterator that will paginate through responses from " ManagedBlockchainQuery.Client.list_filtered_transaction_events( )". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( 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' }, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **network** (*string*) -- **[REQUIRED]** The blockchain network where the transaction occurred. Valid Values: "BITCOIN_MAINNET" | "BITCOIN_TESTNET" * **addressIdentifierFilter** (*dict*) -- **[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) --* * **timeFilter** (*dict*) -- 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. Note: This "timestamp" will only be recorded up to the second. * **to** *(dict) --* The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **voutFilter** (*dict*) -- This container specifies filtering attributes related to BITCOIN_VOUT event types * **voutSpent** *(boolean) --* **[REQUIRED]** Specifies if the transaction output is spent or unspent. * **confirmationStatusFilter** (*dict*) -- 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) --* * **sort** (*dict*) -- 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". * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: 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. Note: This is only returned for "BITCOIN_VOUT" event types. * **spentVoutTransactionId** *(string) --* The transactionId that *created* the spent transaction output. Note: This is only returned for "BITCOIN_VIN" event types. * **spentVoutTransactionHash** *(string) --* The transactionHash that *created* the spent transaction output. Note: This is only returned for "BITCOIN_VIN" event types. * **spentVoutIndex** *(integer) --* The position of the spent transaction output in the output list of the *creating transaction*. Note: This is only returned for "BITCOIN_VIN" event types. * **blockchainInstant** *(dict) --* The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **confirmationStatus** *(string) --* This container specifies whether the transaction has reached Finality. * **NextToken** *(string) --* A token to resume pagination. ManagedBlockchainQuery / Client / list_asset_contracts list_asset_contracts ******************** ManagedBlockchainQuery.Client.list_asset_contracts(**kwargs) Lists all the contracts for a given contract type deployed by an address (either a contract address or a wallet address). The Bitcoin blockchain networks do not support this operation. See also: AWS API Documentation **Request Syntax** response = client.list_asset_contracts( contractFilter={ 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'tokenStandard': 'ERC20'|'ERC721'|'ERC1155', 'deployerAddress': 'string' }, nextToken='string', maxResults=123 ) Parameters: * **contractFilter** (*dict*) -- **[REQUIRED]** Contains the filter parameter for the request. * **network** *(string) --* **[REQUIRED]** The blockchain network of the contract. * **tokenStandard** *(string) --* **[REQUIRED]** The container for the token standard. * **deployerAddress** *(string) --* **[REQUIRED]** The network address of the deployer. * **nextToken** (*string*) -- The pagination token that indicates the next set of results to retrieve. * **maxResults** (*integer*) -- The maximum number of contracts to list. Default: "100" Note: Even if additional results can be retrieved, the request can return less results than "maxResults" or an empty array of results.To retrieve the next set of results, make another request with the returned "nextToken" value. The value of "nextToken" is "null" when there are no more results to return Return type: dict Returns: **Response Syntax** { 'contracts': [ { 'contractIdentifier': { 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string' }, 'tokenStandard': 'ERC20'|'ERC721'|'ERC1155', 'deployerAddress': 'string' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **contracts** *(list) --* An array of contract objects that contain the properties for each contract. * *(dict) --* This container contains information about an contract. * **contractIdentifier** *(dict) --* The container for the contract identifier containing its blockchain network and address. * **network** *(string) --* The blockchain network of the contract. * **contractAddress** *(string) --* Container for the blockchain address about a contract. * **tokenStandard** *(string) --* The token standard of the contract. * **deployerAddress** *(string) --* The address of the contract deployer. * **nextToken** *(string) --* The pagination token that indicates the next set of results to retrieve. **Exceptions** * "ManagedBlockchainQuery.Client.exceptions.ThrottlingException" * "ManagedBlockchainQuery.Client.exceptions.ValidationException" * "ManagedBlockchainQuery.Client.exceptions.AccessDeniedException" * "ManagedBlockchainQuery.Client.exceptions.InternalServerExceptio n" * "ManagedBlockchainQuery.Client.exceptions.ServiceQuotaExceededEx ception" ManagedBlockchainQuery / Client / get_paginator get_paginator ************* ManagedBlockchainQuery.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. ManagedBlockchainQuery / Client / can_paginate can_paginate ************ ManagedBlockchainQuery.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. ManagedBlockchainQuery / Client / list_filtered_transaction_events list_filtered_transaction_events ******************************** ManagedBlockchainQuery.Client.list_filtered_transaction_events(**kwargs) Lists all the transaction events for an address on the blockchain. Note: This operation is only supported on the Bitcoin networks. See also: AWS API Documentation **Request Syntax** response = 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 ) Parameters: * **network** (*string*) -- **[REQUIRED]** The blockchain network where the transaction occurred. Valid Values: "BITCOIN_MAINNET" | "BITCOIN_TESTNET" * **addressIdentifierFilter** (*dict*) -- **[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) --* * **timeFilter** (*dict*) -- 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. Note: This "timestamp" will only be recorded up to the second. * **to** *(dict) --* The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **voutFilter** (*dict*) -- This container specifies filtering attributes related to BITCOIN_VOUT event types * **voutSpent** *(boolean) --* **[REQUIRED]** Specifies if the transaction output is spent or unspent. * **confirmationStatusFilter** (*dict*) -- 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) --* * **sort** (*dict*) -- 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". * **nextToken** (*string*) -- The pagination token that indicates the next set of results to retrieve. * **maxResults** (*integer*) -- The maximum number of transaction events to list. Default: "100" Note: Even if additional results can be retrieved, the request can return less results than "maxResults" or an empty array of results.To retrieve the next set of results, make another request with the returned "nextToken" value. The value of "nextToken" is "null" when there are no more results to return Return type: 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. Note: This is only returned for "BITCOIN_VOUT" event types. * **spentVoutTransactionId** *(string) --* The transactionId that *created* the spent transaction output. Note: This is only returned for "BITCOIN_VIN" event types. * **spentVoutTransactionHash** *(string) --* The transactionHash that *created* the spent transaction output. Note: This is only returned for "BITCOIN_VIN" event types. * **spentVoutIndex** *(integer) --* The position of the spent transaction output in the output list of the *creating transaction*. Note: This is only returned for "BITCOIN_VIN" event types. * **blockchainInstant** *(dict) --* The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **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. **Exceptions** * "ManagedBlockchainQuery.Client.exceptions.ThrottlingException" * "ManagedBlockchainQuery.Client.exceptions.ValidationException" * "ManagedBlockchainQuery.Client.exceptions.AccessDeniedException" * "ManagedBlockchainQuery.Client.exceptions.InternalServerExceptio n" * "ManagedBlockchainQuery.Client.exceptions.ServiceQuotaExceededEx ception" ManagedBlockchainQuery / Client / get_waiter get_waiter ********** ManagedBlockchainQuery.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" ManagedBlockchainQuery / Client / list_token_balances list_token_balances ******************* ManagedBlockchainQuery.Client.list_token_balances(**kwargs) This action returns the following for a given blockchain network: * Lists all token balances owned by an address (either a contract address or a wallet address). * Lists all token balances for all tokens created by a contract. * Lists all token balances for a given token. Note: You must always specify the network property of the "tokenFilter" when using this operation. See also: AWS API Documentation **Request Syntax** response = client.list_token_balances( ownerFilter={ 'address': 'string' }, tokenFilter={ 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string', 'tokenId': 'string' }, nextToken='string', maxResults=123 ) Parameters: * **ownerFilter** (*dict*) -- The contract or wallet address on the blockchain network by which to filter the request. You must specify the "address" property of the "ownerFilter" when listing balances of tokens owned by the address. * **address** *(string) --* **[REQUIRED]** The contract or wallet address. * **tokenFilter** (*dict*) -- **[REQUIRED]** The contract address or a token identifier on the blockchain network by which to filter the request. You must specify the "contractAddress" property of this container when listing tokens minted by a contract. Note: You must always specify the network property of this container when using this operation. * **network** *(string) --* **[REQUIRED]** The blockchain network of the token. * **contractAddress** *(string) --* This is the address of the contract. * **tokenId** *(string) --* The unique identifier of the token. * **nextToken** (*string*) -- The pagination token that indicates the next set of results to retrieve. * **maxResults** (*integer*) -- The maximum number of token balances to return. Default: "100" Note: Even if additional results can be retrieved, the request can return less results than "maxResults" or an empty array of results.To retrieve the next set of results, make another request with the returned "nextToken" value. The value of "nextToken" is "null" when there are no more results to return Return type: dict Returns: **Response Syntax** { 'tokenBalances': [ { 'ownerIdentifier': { 'address': 'string' }, 'tokenIdentifier': { 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string', 'tokenId': 'string' }, 'balance': 'string', 'atBlockchainInstant': { 'time': datetime(2015, 1, 1) }, 'lastUpdatedTime': { 'time': datetime(2015, 1, 1) } }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **tokenBalances** *(list) --* An array of "TokenBalance" objects. Each object contains details about the token balance. * *(dict) --* The balance of the token. * **ownerIdentifier** *(dict) --* The container for the identifier of the owner. * **address** *(string) --* The contract or wallet address for the owner. * **tokenIdentifier** *(dict) --* The identifier for the token, including the unique token ID and its blockchain network. * **network** *(string) --* The blockchain network of the token. * **contractAddress** *(string) --* This is the token's contract address. * **tokenId** *(string) --* The unique identifier of the token. Note: For native tokens, use the 3 character abbreviation that best matches your token. For example, btc for Bitcoin, eth for Ether, etc. For all other token types you must specify the "tokenId" in the 64 character hexadecimal "tokenid" format. * **balance** *(string) --* The container of the token balance. * **atBlockchainInstant** *(dict) --* The time for when the TokenBalance is requested or the current time if a time is not provided in the request. Note: This time will only be recorded up to the second. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **lastUpdatedTime** *(dict) --* The "Timestamp" of the last transaction at which the balance for the token in the wallet was updated. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **nextToken** *(string) --* The pagination token that indicates the next set of results to retrieve. **Exceptions** * "ManagedBlockchainQuery.Client.exceptions.ThrottlingException" * "ManagedBlockchainQuery.Client.exceptions.ValidationException" * "ManagedBlockchainQuery.Client.exceptions.AccessDeniedException" * "ManagedBlockchainQuery.Client.exceptions.InternalServerExceptio n" * "ManagedBlockchainQuery.Client.exceptions.ServiceQuotaExceededEx ception" ManagedBlockchainQuery / Client / get_asset_contract get_asset_contract ****************** ManagedBlockchainQuery.Client.get_asset_contract(**kwargs) Gets the information about a specific contract deployed on the blockchain. Note: * The Bitcoin blockchain networks do not support this operation. * Metadata is currently only available for some "ERC-20" contracts. Metadata will be available for additional contracts in the future. See also: AWS API Documentation **Request Syntax** response = client.get_asset_contract( contractIdentifier={ 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string' } ) Parameters: **contractIdentifier** (*dict*) -- **[REQUIRED]** Contains the blockchain address and network information about the contract. * **network** *(string) --* **[REQUIRED]** The blockchain network of the contract. * **contractAddress** *(string) --* **[REQUIRED]** Container for the blockchain address about a contract. Return type: dict Returns: **Response Syntax** { 'contractIdentifier': { 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string' }, 'tokenStandard': 'ERC20'|'ERC721'|'ERC1155', 'deployerAddress': 'string', 'metadata': { 'name': 'string', 'symbol': 'string', 'decimals': 123 } } **Response Structure** * *(dict) --* * **contractIdentifier** *(dict) --* Contains the blockchain address and network information about the contract. * **network** *(string) --* The blockchain network of the contract. * **contractAddress** *(string) --* Container for the blockchain address about a contract. * **tokenStandard** *(string) --* The token standard of the contract requested. * **deployerAddress** *(string) --* The address of the deployer of contract. * **metadata** *(dict) --* The metadata of the contract. * **name** *(string) --* The name of the token contract. * **symbol** *(string) --* The symbol of the token contract. * **decimals** *(integer) --* The decimals used by the token contract. **Exceptions** * "ManagedBlockchainQuery.Client.exceptions.ThrottlingException" * "ManagedBlockchainQuery.Client.exceptions.ValidationException" * "ManagedBlockchainQuery.Client.exceptions.ResourceNotFoundExcept ion" * "ManagedBlockchainQuery.Client.exceptions.AccessDeniedException" * "ManagedBlockchainQuery.Client.exceptions.InternalServerExceptio n" * "ManagedBlockchainQuery.Client.exceptions.ServiceQuotaExceededEx ception" ManagedBlockchainQuery / Client / close close ***** ManagedBlockchainQuery.Client.close() Closes underlying endpoint connections. ManagedBlockchainQuery / Client / batch_get_token_balance batch_get_token_balance *********************** ManagedBlockchainQuery.Client.batch_get_token_balance(**kwargs) Gets the token balance for a batch of tokens by using the "BatchGetTokenBalance" action for every token in the request. Note: Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported. See also: AWS API Documentation **Request Syntax** response = client.batch_get_token_balance( getTokenBalanceInputs=[ { 'tokenIdentifier': { 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string', 'tokenId': 'string' }, 'ownerIdentifier': { 'address': 'string' }, 'atBlockchainInstant': { 'time': datetime(2015, 1, 1) } }, ] ) Parameters: **getTokenBalanceInputs** (*list*) -- An array of "BatchGetTokenBalanceInputItem" objects whose balance is being requested. * *(dict) --* The container for the input for getting a token balance. * **tokenIdentifier** *(dict) --* **[REQUIRED]** The container for the identifier for the token including the unique token ID and its blockchain network. Note: Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported. * **network** *(string) --* **[REQUIRED]** The blockchain network of the token. * **contractAddress** *(string) --* This is the token's contract address. * **tokenId** *(string) --* The unique identifier of the token. Note: For native tokens, use the 3 character abbreviation that best matches your token. For example, btc for Bitcoin, eth for Ether, etc. For all other token types you must specify the "tokenId" in the 64 character hexadecimal "tokenid" format. * **ownerIdentifier** *(dict) --* **[REQUIRED]** The container for the owner identifier. * **address** *(string) --* **[REQUIRED]** The contract or wallet address for the owner. * **atBlockchainInstant** *(dict) --* The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. Return type: dict Returns: **Response Syntax** { 'tokenBalances': [ { 'ownerIdentifier': { 'address': 'string' }, 'tokenIdentifier': { 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string', 'tokenId': 'string' }, 'balance': 'string', 'atBlockchainInstant': { 'time': datetime(2015, 1, 1) }, 'lastUpdatedTime': { 'time': datetime(2015, 1, 1) } }, ], 'errors': [ { 'tokenIdentifier': { 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string', 'tokenId': 'string' }, 'ownerIdentifier': { 'address': 'string' }, 'atBlockchainInstant': { 'time': datetime(2015, 1, 1) }, 'errorCode': 'string', 'errorMessage': 'string', 'errorType': 'VALIDATION_EXCEPTION'|'RESOURCE_NOT_FOUND_EXCEPTION' }, ] } **Response Structure** * *(dict) --* * **tokenBalances** *(list) --* An array of "BatchGetTokenBalanceOutputItem" objects returned by the response. * *(dict) --* The container for the properties of a token balance output. * **ownerIdentifier** *(dict) --* The container for the owner identifier. * **address** *(string) --* The contract or wallet address for the owner. * **tokenIdentifier** *(dict) --* The container for the identifier for the token including the unique token ID and its blockchain network. Note: Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported. * **network** *(string) --* The blockchain network of the token. * **contractAddress** *(string) --* This is the token's contract address. * **tokenId** *(string) --* The unique identifier of the token. Note: For native tokens, use the 3 character abbreviation that best matches your token. For example, btc for Bitcoin, eth for Ether, etc. For all other token types you must specify the "tokenId" in the 64 character hexadecimal "tokenid" format. * **balance** *(string) --* The container for the token balance. * **atBlockchainInstant** *(dict) --* The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **lastUpdatedTime** *(dict) --* The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **errors** *(list) --* An array of "BatchGetTokenBalanceErrorItem" objects returned from the request. * *(dict) --* Error generated from a failed "BatchGetTokenBalance" request. * **tokenIdentifier** *(dict) --* The container for the identifier for the token including the unique token ID and its blockchain network. Note: Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported. * **network** *(string) --* The blockchain network of the token. * **contractAddress** *(string) --* This is the token's contract address. * **tokenId** *(string) --* The unique identifier of the token. Note: For native tokens, use the 3 character abbreviation that best matches your token. For example, btc for Bitcoin, eth for Ether, etc. For all other token types you must specify the "tokenId" in the 64 character hexadecimal "tokenid" format. * **ownerIdentifier** *(dict) --* The container for the owner identifier. * **address** *(string) --* The contract or wallet address for the owner. * **atBlockchainInstant** *(dict) --* The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **errorCode** *(string) --* The error code associated with the error. * **errorMessage** *(string) --* The message associated with the error. * **errorType** *(string) --* The type of error. **Exceptions** * "ManagedBlockchainQuery.Client.exceptions.ThrottlingException" * "ManagedBlockchainQuery.Client.exceptions.ValidationException" * "ManagedBlockchainQuery.Client.exceptions.ResourceNotFoundExcept ion" * "ManagedBlockchainQuery.Client.exceptions.AccessDeniedException" * "ManagedBlockchainQuery.Client.exceptions.InternalServerExceptio n" * "ManagedBlockchainQuery.Client.exceptions.ServiceQuotaExceededEx ception" ManagedBlockchainQuery / Client / list_transactions list_transactions ***************** ManagedBlockchainQuery.Client.list_transactions(**kwargs) Lists all the transaction events for a transaction. See also: AWS API Documentation **Request Syntax** response = client.list_transactions( address='string', network='ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', fromBlockchainInstant={ 'time': datetime(2015, 1, 1) }, toBlockchainInstant={ 'time': datetime(2015, 1, 1) }, sort={ 'sortBy': 'TRANSACTION_TIMESTAMP', 'sortOrder': 'ASCENDING'|'DESCENDING' }, nextToken='string', maxResults=123, confirmationStatusFilter={ 'include': [ 'FINAL'|'NONFINAL', ] } ) Parameters: * **address** (*string*) -- **[REQUIRED]** The address (either a contract or wallet), whose transactions are being requested. * **network** (*string*) -- **[REQUIRED]** The blockchain network where the transactions occurred. * **fromBlockchainInstant** (*dict*) -- The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **toBlockchainInstant** (*dict*) -- The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **sort** (*dict*) -- The order by which the results will be sorted. * **sortBy** *(string) --* Defaults to the value "TRANSACTION_TIMESTAMP". * **sortOrder** *(string) --* The container for the *sort order* for "ListTransactions". The "SortOrder" field only accepts the values "ASCENDING" and "DESCENDING". Not providing "SortOrder" will default to "ASCENDING". * **nextToken** (*string*) -- The pagination token that indicates the next set of results to retrieve. * **maxResults** (*integer*) -- The maximum number of transactions to list. Default: "100" Note: Even if additional results can be retrieved, the request can return less results than "maxResults" or an empty array of results.To retrieve the next set of results, make another request with the returned "nextToken" value. The value of "nextToken" is "null" when there are no more results to return * **confirmationStatusFilter** (*dict*) -- This filter is used to include transactions in the response that haven't reached finality. Transactions that have reached finality are always part of the response. * **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) --* Return type: dict Returns: **Response Syntax** { 'transactions': [ { 'transactionHash': 'string', 'transactionId': 'string', 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'transactionTimestamp': datetime(2015, 1, 1), 'confirmationStatus': 'FINAL'|'NONFINAL' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **transactions** *(list) --* The array of transactions returned by the request. * *(dict) --* The container of the transaction output. * **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. * **network** *(string) --* The blockchain network where the transaction occurred. * **transactionTimestamp** *(datetime) --* The time when the transaction occurred. * **confirmationStatus** *(string) --* Specifies whether to list transactions that have not reached Finality. * **nextToken** *(string) --* The pagination token that indicates the next set of results to retrieve. **Exceptions** * "ManagedBlockchainQuery.Client.exceptions.ThrottlingException" * "ManagedBlockchainQuery.Client.exceptions.ValidationException" * "ManagedBlockchainQuery.Client.exceptions.AccessDeniedException" * "ManagedBlockchainQuery.Client.exceptions.InternalServerExceptio n" * "ManagedBlockchainQuery.Client.exceptions.ServiceQuotaExceededEx ception" 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.ResourceNotFoundExcept ion" * "ManagedBlockchainQuery.Client.exceptions.AccessDeniedException" * "ManagedBlockchainQuery.Client.exceptions.InternalServerExceptio n" * "ManagedBlockchainQuery.Client.exceptions.ServiceQuotaExceededEx ception" ManagedBlockchainQuery / Client / list_transaction_events list_transaction_events *********************** ManagedBlockchainQuery.Client.list_transaction_events(**kwargs) Lists all the transaction events for 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.list_transaction_events( transactionHash='string', transactionId='string', network='ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', nextToken='string', maxResults=123 ) 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 events occurred. * **nextToken** (*string*) -- The pagination token that indicates the next set of results to retrieve. * **maxResults** (*integer*) -- The maximum number of transaction events to list. Default: "100" Note: Even if additional results can be retrieved, the request can return less results than "maxResults" or an empty array of results.To retrieve the next set of results, make another request with the returned "nextToken" value. The value of "nextToken" is "null" when there are no more results to return Return type: 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. Note: This is only returned for "BITCOIN_VOUT" event types. * **spentVoutTransactionId** *(string) --* The transactionId that *created* the spent transaction output. Note: This is only returned for "BITCOIN_VIN" event types. * **spentVoutTransactionHash** *(string) --* The transactionHash that *created* the spent transaction output. Note: This is only returned for "BITCOIN_VIN" event types. * **spentVoutIndex** *(integer) --* The position of the spent transaction output in the output list of the *creating transaction*. Note: This is only returned for "BITCOIN_VIN" event types. * **blockchainInstant** *(dict) --* The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **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. **Exceptions** * "ManagedBlockchainQuery.Client.exceptions.ThrottlingException" * "ManagedBlockchainQuery.Client.exceptions.ValidationException" * "ManagedBlockchainQuery.Client.exceptions.AccessDeniedException" * "ManagedBlockchainQuery.Client.exceptions.InternalServerExceptio n" * "ManagedBlockchainQuery.Client.exceptions.ServiceQuotaExceededEx ception" ManagedBlockchainQuery / Client / get_token_balance get_token_balance ***************** ManagedBlockchainQuery.Client.get_token_balance(**kwargs) Gets the balance of a specific token, including native tokens, for a given address (wallet or contract) on the blockchain. Note: Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported. See also: AWS API Documentation **Request Syntax** response = client.get_token_balance( tokenIdentifier={ 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string', 'tokenId': 'string' }, ownerIdentifier={ 'address': 'string' }, atBlockchainInstant={ 'time': datetime(2015, 1, 1) } ) Parameters: * **tokenIdentifier** (*dict*) -- **[REQUIRED]** The container for the identifier for the token, including the unique token ID and its blockchain network. * **network** *(string) --* **[REQUIRED]** The blockchain network of the token. * **contractAddress** *(string) --* This is the token's contract address. * **tokenId** *(string) --* The unique identifier of the token. Note: For native tokens, use the 3 character abbreviation that best matches your token. For example, btc for Bitcoin, eth for Ether, etc. For all other token types you must specify the "tokenId" in the 64 character hexadecimal "tokenid" format. * **ownerIdentifier** (*dict*) -- **[REQUIRED]** The container for the identifier for the owner. * **address** *(string) --* **[REQUIRED]** The contract or wallet address for the owner. * **atBlockchainInstant** (*dict*) -- The time for when the TokenBalance is requested or the current time if a time is not provided in the request. Note: This time will only be recorded up to the second. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. Return type: dict Returns: **Response Syntax** { 'ownerIdentifier': { 'address': 'string' }, 'tokenIdentifier': { 'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET', 'contractAddress': 'string', 'tokenId': 'string' }, 'balance': 'string', 'atBlockchainInstant': { 'time': datetime(2015, 1, 1) }, 'lastUpdatedTime': { 'time': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **ownerIdentifier** *(dict) --* The container for the owner identifier. * **address** *(string) --* The contract or wallet address for the owner. * **tokenIdentifier** *(dict) --* The container for the identifier for the token including the unique token ID and its blockchain network. Note: Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported. * **network** *(string) --* The blockchain network of the token. * **contractAddress** *(string) --* This is the token's contract address. * **tokenId** *(string) --* The unique identifier of the token. Note: For native tokens, use the 3 character abbreviation that best matches your token. For example, btc for Bitcoin, eth for Ether, etc. For all other token types you must specify the "tokenId" in the 64 character hexadecimal "tokenid" format. * **balance** *(string) --* The container for the token balance. * **atBlockchainInstant** *(dict) --* The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. * **lastUpdatedTime** *(dict) --* The container for time. * **time** *(datetime) --* The container of the "Timestamp" of the blockchain instant. Note: This "timestamp" will only be recorded up to the second. **Exceptions** * "ManagedBlockchainQuery.Client.exceptions.ThrottlingException" * "ManagedBlockchainQuery.Client.exceptions.ValidationException" * "ManagedBlockchainQuery.Client.exceptions.ResourceNotFoundExcept ion" * "ManagedBlockchainQuery.Client.exceptions.AccessDeniedException" * "ManagedBlockchainQuery.Client.exceptions.InternalServerExceptio n" * "ManagedBlockchainQuery.Client.exceptions.ServiceQuotaExceededEx ception"