

# Actions
<a name="API_Operations"></a>

The following actions are supported:
+  [BatchGetTokenBalance](API_BatchGetTokenBalance.md) 
+  [GetAssetContract](API_GetAssetContract.md) 
+  [GetTokenBalance](API_GetTokenBalance.md) 
+  [GetTransaction](API_GetTransaction.md) 
+  [ListAssetContracts](API_ListAssetContracts.md) 
+  [ListFilteredTransactionEvents](API_ListFilteredTransactionEvents.md) 
+  [ListTokenBalances](API_ListTokenBalances.md) 
+  [ListTransactionEvents](API_ListTransactionEvents.md) 
+  [ListTransactions](API_ListTransactions.md) 

# BatchGetTokenBalance
<a name="API_BatchGetTokenBalance"></a>

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.

## Request Syntax
<a name="API_BatchGetTokenBalance_RequestSyntax"></a>

```
POST /batch-get-token-balance HTTP/1.1
Content-type: application/json

{
   "getTokenBalanceInputs": [ 
      { 
         "atBlockchainInstant": { 
            "time": number
         },
         "ownerIdentifier": { 
            "address": "string"
         },
         "tokenIdentifier": { 
            "contractAddress": "string",
            "network": "string",
            "tokenId": "string"
         }
      }
   ]
}
```

## URI Request Parameters
<a name="API_BatchGetTokenBalance_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_BatchGetTokenBalance_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [getTokenBalanceInputs](#API_BatchGetTokenBalance_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-BatchGetTokenBalance-request-getTokenBalanceInputs"></a>
An array of `BatchGetTokenBalanceInputItem` objects whose balance is being requested.  
Type: Array of [BatchGetTokenBalanceInputItem](API_BatchGetTokenBalanceInputItem.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 10 items.  
Required: No

## Response Syntax
<a name="API_BatchGetTokenBalance_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "errors": [ 
      { 
         "atBlockchainInstant": { 
            "time": number
         },
         "errorCode": "string",
         "errorMessage": "string",
         "errorType": "string",
         "ownerIdentifier": { 
            "address": "string"
         },
         "tokenIdentifier": { 
            "contractAddress": "string",
            "network": "string",
            "tokenId": "string"
         }
      }
   ],
   "tokenBalances": [ 
      { 
         "atBlockchainInstant": { 
            "time": number
         },
         "balance": "string",
         "lastUpdatedTime": { 
            "time": number
         },
         "ownerIdentifier": { 
            "address": "string"
         },
         "tokenIdentifier": { 
            "contractAddress": "string",
            "network": "string",
            "tokenId": "string"
         }
      }
   ]
}
```

## Response Elements
<a name="API_BatchGetTokenBalance_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [errors](#API_BatchGetTokenBalance_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-BatchGetTokenBalance-response-errors"></a>
An array of `BatchGetTokenBalanceErrorItem` objects returned from the request.  
Type: Array of [BatchGetTokenBalanceErrorItem](API_BatchGetTokenBalanceErrorItem.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 10 items.

 ** [tokenBalances](#API_BatchGetTokenBalance_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-BatchGetTokenBalance-response-tokenBalances"></a>
An array of `BatchGetTokenBalanceOutputItem` objects returned by the response.  
Type: Array of [BatchGetTokenBalanceOutputItem](API_BatchGetTokenBalanceOutputItem.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 10 items.

## Errors
<a name="API_BatchGetTokenBalance_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 [AccessDeniedException](API_AccessDeniedException.md)   
The AWS account doesn’t have access to this resource.     
 ** message **   
The container for the exception message.
HTTP Status Code: 403

 [InternalServerException](API_InternalServerException.md)   
The request processing has failed because of an internal error in the service.    
 ** message **   
The container for the exception message.  
 ** retryAfterSeconds **   
Specifies the `retryAfterSeconds` value.
HTTP Status Code: 500

 [ResourceNotFoundException](API_ResourceNotFoundException.md)   
The resource was not found.    
 ** message **   
The container for the exception message.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.
HTTP Status Code: 404

 [ServiceQuotaExceededException](API_ServiceQuotaExceededException.md)   
The service quota has been exceeded for this resource.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 402

 [ThrottlingException](API_ThrottlingException.md)   
The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** retryAfterSeconds **   
The container of the `retryAfterSeconds` value.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 429

 [ValidationException](API_ValidationException.md)   
The resource passed is invalid.    
 ** fieldList **   
The container for the `fieldList` of the exception.  
 ** message **   
The container for the exception message.  
 ** reason **   
The container for the reason for the exception
HTTP Status Code: 400

## See Also
<a name="API_BatchGetTokenBalance_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/managedblockchain-query-2023-05-04/BatchGetTokenBalance) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/managedblockchain-query-2023-05-04/BatchGetTokenBalance) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/managedblockchain-query-2023-05-04/BatchGetTokenBalance) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/managedblockchain-query-2023-05-04/BatchGetTokenBalance) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/managedblockchain-query-2023-05-04/BatchGetTokenBalance) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/managedblockchain-query-2023-05-04/BatchGetTokenBalance) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/managedblockchain-query-2023-05-04/BatchGetTokenBalance) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/managedblockchain-query-2023-05-04/BatchGetTokenBalance) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/managedblockchain-query-2023-05-04/BatchGetTokenBalance) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/managedblockchain-query-2023-05-04/BatchGetTokenBalance) 

# GetAssetContract
<a name="API_GetAssetContract"></a>

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.

## Request Syntax
<a name="API_GetAssetContract_RequestSyntax"></a>

```
POST /get-asset-contract HTTP/1.1
Content-type: application/json

{
   "contractIdentifier": { 
      "contractAddress": "string",
      "network": "string"
   }
}
```

## URI Request Parameters
<a name="API_GetAssetContract_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_GetAssetContract_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [contractIdentifier](#API_GetAssetContract_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetAssetContract-request-contractIdentifier"></a>
Contains the blockchain address and network information about the contract.  
Type: [ContractIdentifier](API_ContractIdentifier.md) object  
Required: Yes

## Response Syntax
<a name="API_GetAssetContract_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "contractIdentifier": { 
      "contractAddress": "string",
      "network": "string"
   },
   "deployerAddress": "string",
   "metadata": { 
      "decimals": number,
      "name": "string",
      "symbol": "string"
   },
   "tokenStandard": "string"
}
```

## Response Elements
<a name="API_GetAssetContract_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [contractIdentifier](#API_GetAssetContract_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetAssetContract-response-contractIdentifier"></a>
Contains the blockchain address and network information about the contract.  
Type: [ContractIdentifier](API_ContractIdentifier.md) object

 ** [deployerAddress](#API_GetAssetContract_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetAssetContract-response-deployerAddress"></a>
The address of the deployer of contract.  
Type: String  
Pattern: `[-A-Za-z0-9]{13,74}` 

 ** [metadata](#API_GetAssetContract_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetAssetContract-response-metadata"></a>
The metadata of the contract.  
Type: [ContractMetadata](API_ContractMetadata.md) object

 ** [tokenStandard](#API_GetAssetContract_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetAssetContract-response-tokenStandard"></a>
The token standard of the contract requested.  
Type: String  
Valid Values: `ERC20 | ERC721 | ERC1155` 

## Errors
<a name="API_GetAssetContract_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 [AccessDeniedException](API_AccessDeniedException.md)   
The AWS account doesn’t have access to this resource.     
 ** message **   
The container for the exception message.
HTTP Status Code: 403

 [InternalServerException](API_InternalServerException.md)   
The request processing has failed because of an internal error in the service.    
 ** message **   
The container for the exception message.  
 ** retryAfterSeconds **   
Specifies the `retryAfterSeconds` value.
HTTP Status Code: 500

 [ResourceNotFoundException](API_ResourceNotFoundException.md)   
The resource was not found.    
 ** message **   
The container for the exception message.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.
HTTP Status Code: 404

 [ServiceQuotaExceededException](API_ServiceQuotaExceededException.md)   
The service quota has been exceeded for this resource.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 402

 [ThrottlingException](API_ThrottlingException.md)   
The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** retryAfterSeconds **   
The container of the `retryAfterSeconds` value.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 429

 [ValidationException](API_ValidationException.md)   
The resource passed is invalid.    
 ** fieldList **   
The container for the `fieldList` of the exception.  
 ** message **   
The container for the exception message.  
 ** reason **   
The container for the reason for the exception
HTTP Status Code: 400

## See Also
<a name="API_GetAssetContract_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/managedblockchain-query-2023-05-04/GetAssetContract) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/managedblockchain-query-2023-05-04/GetAssetContract) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/managedblockchain-query-2023-05-04/GetAssetContract) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/managedblockchain-query-2023-05-04/GetAssetContract) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/managedblockchain-query-2023-05-04/GetAssetContract) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/managedblockchain-query-2023-05-04/GetAssetContract) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/managedblockchain-query-2023-05-04/GetAssetContract) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/managedblockchain-query-2023-05-04/GetAssetContract) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/managedblockchain-query-2023-05-04/GetAssetContract) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/managedblockchain-query-2023-05-04/GetAssetContract) 

# GetTokenBalance
<a name="API_GetTokenBalance"></a>

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.

## Request Syntax
<a name="API_GetTokenBalance_RequestSyntax"></a>

```
POST /get-token-balance HTTP/1.1
Content-type: application/json

{
   "atBlockchainInstant": { 
      "time": number
   },
   "ownerIdentifier": { 
      "address": "string"
   },
   "tokenIdentifier": { 
      "contractAddress": "string",
      "network": "string",
      "tokenId": "string"
   }
}
```

## URI Request Parameters
<a name="API_GetTokenBalance_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_GetTokenBalance_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [atBlockchainInstant](#API_GetTokenBalance_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetTokenBalance-request-atBlockchainInstant"></a>
The time for when the TokenBalance is requested or the current time if a time is not provided in the request.  
This time will only be recorded up to the second.
Type: [BlockchainInstant](API_BlockchainInstant.md) object  
Required: No

 ** [ownerIdentifier](#API_GetTokenBalance_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetTokenBalance-request-ownerIdentifier"></a>
The container for the identifier for the owner.  
Type: [OwnerIdentifier](API_OwnerIdentifier.md) object  
Required: Yes

 ** [tokenIdentifier](#API_GetTokenBalance_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetTokenBalance-request-tokenIdentifier"></a>
The container for the identifier for the token, including the unique token ID and its blockchain network.  
Type: [TokenIdentifier](API_TokenIdentifier.md) object  
Required: Yes

## Response Syntax
<a name="API_GetTokenBalance_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "atBlockchainInstant": { 
      "time": number
   },
   "balance": "string",
   "lastUpdatedTime": { 
      "time": number
   },
   "ownerIdentifier": { 
      "address": "string"
   },
   "tokenIdentifier": { 
      "contractAddress": "string",
      "network": "string",
      "tokenId": "string"
   }
}
```

## Response Elements
<a name="API_GetTokenBalance_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [atBlockchainInstant](#API_GetTokenBalance_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetTokenBalance-response-atBlockchainInstant"></a>
The container for time.  
Type: [BlockchainInstant](API_BlockchainInstant.md) object

 ** [balance](#API_GetTokenBalance_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetTokenBalance-response-balance"></a>
The container for the token balance.  
Type: String

 ** [lastUpdatedTime](#API_GetTokenBalance_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetTokenBalance-response-lastUpdatedTime"></a>
The container for time.  
Type: [BlockchainInstant](API_BlockchainInstant.md) object

 ** [ownerIdentifier](#API_GetTokenBalance_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetTokenBalance-response-ownerIdentifier"></a>
The container for the owner identifier.  
Type: [OwnerIdentifier](API_OwnerIdentifier.md) object

 ** [tokenIdentifier](#API_GetTokenBalance_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetTokenBalance-response-tokenIdentifier"></a>
The container for the identifier for the token including the unique token ID and its blockchain network.  
Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.
Type: [TokenIdentifier](API_TokenIdentifier.md) object

## Errors
<a name="API_GetTokenBalance_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 [AccessDeniedException](API_AccessDeniedException.md)   
The AWS account doesn’t have access to this resource.     
 ** message **   
The container for the exception message.
HTTP Status Code: 403

 [InternalServerException](API_InternalServerException.md)   
The request processing has failed because of an internal error in the service.    
 ** message **   
The container for the exception message.  
 ** retryAfterSeconds **   
Specifies the `retryAfterSeconds` value.
HTTP Status Code: 500

 [ResourceNotFoundException](API_ResourceNotFoundException.md)   
The resource was not found.    
 ** message **   
The container for the exception message.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.
HTTP Status Code: 404

 [ServiceQuotaExceededException](API_ServiceQuotaExceededException.md)   
The service quota has been exceeded for this resource.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 402

 [ThrottlingException](API_ThrottlingException.md)   
The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** retryAfterSeconds **   
The container of the `retryAfterSeconds` value.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 429

 [ValidationException](API_ValidationException.md)   
The resource passed is invalid.    
 ** fieldList **   
The container for the `fieldList` of the exception.  
 ** message **   
The container for the exception message.  
 ** reason **   
The container for the reason for the exception
HTTP Status Code: 400

## See Also
<a name="API_GetTokenBalance_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/managedblockchain-query-2023-05-04/GetTokenBalance) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/managedblockchain-query-2023-05-04/GetTokenBalance) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/managedblockchain-query-2023-05-04/GetTokenBalance) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/managedblockchain-query-2023-05-04/GetTokenBalance) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/managedblockchain-query-2023-05-04/GetTokenBalance) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/managedblockchain-query-2023-05-04/GetTokenBalance) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/managedblockchain-query-2023-05-04/GetTokenBalance) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/managedblockchain-query-2023-05-04/GetTokenBalance) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/managedblockchain-query-2023-05-04/GetTokenBalance) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/managedblockchain-query-2023-05-04/GetTokenBalance) 

# GetTransaction
<a name="API_GetTransaction"></a>

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](https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality). 

## Request Syntax
<a name="API_GetTransaction_RequestSyntax"></a>

```
POST /get-transaction HTTP/1.1
Content-type: application/json

{
   "network": "string",
   "transactionHash": "string",
   "transactionId": "string"
}
```

## URI Request Parameters
<a name="API_GetTransaction_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_GetTransaction_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [network](#API_GetTransaction_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetTransaction-request-network"></a>
The blockchain network where the transaction occurred.  
Type: String  
Valid Values: `ETHEREUM_MAINNET | ETHEREUM_SEPOLIA_TESTNET | BITCOIN_MAINNET | BITCOIN_TESTNET`   
Required: Yes

 ** [transactionHash](#API_GetTransaction_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetTransaction-request-transactionHash"></a>
The hash of a transaction. It is generated when a transaction is created.  
Type: String  
Pattern: `(0x[A-Fa-f0-9]{64}|[A-Fa-f0-9]{64})`   
Required: No

 ** [transactionId](#API_GetTransaction_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetTransaction-request-transactionId"></a>
The identifier of a Bitcoin transaction. It is generated when a transaction is created.  
 `transactionId` is only supported on the Bitcoin networks.
Type: String  
Pattern: `(0x[A-Fa-f0-9]{64}|[A-Fa-f0-9]{64})`   
Required: No

## Response Syntax
<a name="API_GetTransaction_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "transaction": { 
      "blockHash": "string",
      "blockNumber": "string",
      "confirmationStatus": "string",
      "contractAddress": "string",
      "cumulativeGasUsed": "string",
      "effectiveGasPrice": "string",
      "executionStatus": "string",
      "from": "string",
      "gasUsed": "string",
      "network": "string",
      "numberOfTransactions": number,
      "signatureR": "string",
      "signatureS": "string",
      "signatureV": number,
      "to": "string",
      "transactionFee": "string",
      "transactionHash": "string",
      "transactionId": "string",
      "transactionIndex": number,
      "transactionTimestamp": number
   }
}
```

## Response Elements
<a name="API_GetTransaction_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [transaction](#API_GetTransaction_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-GetTransaction-response-transaction"></a>
Contains the details of the transaction.  
Type: [Transaction](API_Transaction.md) object

## Errors
<a name="API_GetTransaction_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 [AccessDeniedException](API_AccessDeniedException.md)   
The AWS account doesn’t have access to this resource.     
 ** message **   
The container for the exception message.
HTTP Status Code: 403

 [InternalServerException](API_InternalServerException.md)   
The request processing has failed because of an internal error in the service.    
 ** message **   
The container for the exception message.  
 ** retryAfterSeconds **   
Specifies the `retryAfterSeconds` value.
HTTP Status Code: 500

 [ResourceNotFoundException](API_ResourceNotFoundException.md)   
The resource was not found.    
 ** message **   
The container for the exception message.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.
HTTP Status Code: 404

 [ServiceQuotaExceededException](API_ServiceQuotaExceededException.md)   
The service quota has been exceeded for this resource.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 402

 [ThrottlingException](API_ThrottlingException.md)   
The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** retryAfterSeconds **   
The container of the `retryAfterSeconds` value.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 429

 [ValidationException](API_ValidationException.md)   
The resource passed is invalid.    
 ** fieldList **   
The container for the `fieldList` of the exception.  
 ** message **   
The container for the exception message.  
 ** reason **   
The container for the reason for the exception
HTTP Status Code: 400

## See Also
<a name="API_GetTransaction_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/managedblockchain-query-2023-05-04/GetTransaction) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/managedblockchain-query-2023-05-04/GetTransaction) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/managedblockchain-query-2023-05-04/GetTransaction) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/managedblockchain-query-2023-05-04/GetTransaction) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/managedblockchain-query-2023-05-04/GetTransaction) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/managedblockchain-query-2023-05-04/GetTransaction) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/managedblockchain-query-2023-05-04/GetTransaction) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/managedblockchain-query-2023-05-04/GetTransaction) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/managedblockchain-query-2023-05-04/GetTransaction) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/managedblockchain-query-2023-05-04/GetTransaction) 

# ListAssetContracts
<a name="API_ListAssetContracts"></a>

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.

## Request Syntax
<a name="API_ListAssetContracts_RequestSyntax"></a>

```
POST /list-asset-contracts HTTP/1.1
Content-type: application/json

{
   "contractFilter": { 
      "deployerAddress": "string",
      "network": "string",
      "tokenStandard": "string"
   },
   "maxResults": number,
   "nextToken": "string"
}
```

## URI Request Parameters
<a name="API_ListAssetContracts_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListAssetContracts_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [contractFilter](#API_ListAssetContracts_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListAssetContracts-request-contractFilter"></a>
Contains the filter parameter for the request.  
Type: [ContractFilter](API_ContractFilter.md) object  
Required: Yes

 ** [maxResults](#API_ListAssetContracts_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListAssetContracts-request-maxResults"></a>
The maximum number of contracts to list.  
Default: `100`   
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
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 250.  
Required: No

 ** [nextToken](#API_ListAssetContracts_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListAssetContracts-request-nextToken"></a>
 The pagination token that indicates the next set of results to retrieve.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 131070.  
Required: No

## Response Syntax
<a name="API_ListAssetContracts_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "contracts": [ 
      { 
         "contractIdentifier": { 
            "contractAddress": "string",
            "network": "string"
         },
         "deployerAddress": "string",
         "tokenStandard": "string"
      }
   ],
   "nextToken": "string"
}
```

## Response Elements
<a name="API_ListAssetContracts_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [contracts](#API_ListAssetContracts_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListAssetContracts-response-contracts"></a>
An array of contract objects that contain the properties for each contract.  
Type: Array of [AssetContract](API_AssetContract.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 250 items.

 ** [nextToken](#API_ListAssetContracts_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListAssetContracts-response-nextToken"></a>
The pagination token that indicates the next set of results to retrieve.   
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 131070.

## Errors
<a name="API_ListAssetContracts_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 [AccessDeniedException](API_AccessDeniedException.md)   
The AWS account doesn’t have access to this resource.     
 ** message **   
The container for the exception message.
HTTP Status Code: 403

 [InternalServerException](API_InternalServerException.md)   
The request processing has failed because of an internal error in the service.    
 ** message **   
The container for the exception message.  
 ** retryAfterSeconds **   
Specifies the `retryAfterSeconds` value.
HTTP Status Code: 500

 [ServiceQuotaExceededException](API_ServiceQuotaExceededException.md)   
The service quota has been exceeded for this resource.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 402

 [ThrottlingException](API_ThrottlingException.md)   
The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** retryAfterSeconds **   
The container of the `retryAfterSeconds` value.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 429

 [ValidationException](API_ValidationException.md)   
The resource passed is invalid.    
 ** fieldList **   
The container for the `fieldList` of the exception.  
 ** message **   
The container for the exception message.  
 ** reason **   
The container for the reason for the exception
HTTP Status Code: 400

## See Also
<a name="API_ListAssetContracts_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/managedblockchain-query-2023-05-04/ListAssetContracts) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/managedblockchain-query-2023-05-04/ListAssetContracts) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/managedblockchain-query-2023-05-04/ListAssetContracts) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/managedblockchain-query-2023-05-04/ListAssetContracts) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/managedblockchain-query-2023-05-04/ListAssetContracts) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/managedblockchain-query-2023-05-04/ListAssetContracts) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/managedblockchain-query-2023-05-04/ListAssetContracts) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/managedblockchain-query-2023-05-04/ListAssetContracts) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/managedblockchain-query-2023-05-04/ListAssetContracts) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/managedblockchain-query-2023-05-04/ListAssetContracts) 

# ListFilteredTransactionEvents
<a name="API_ListFilteredTransactionEvents"></a>

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

**Note**  
This operation is only supported on the Bitcoin networks.

## Request Syntax
<a name="API_ListFilteredTransactionEvents_RequestSyntax"></a>

```
POST /list-filtered-transaction-events HTTP/1.1
Content-type: application/json

{
   "addressIdentifierFilter": { 
      "transactionEventToAddress": [ "string" ]
   },
   "confirmationStatusFilter": { 
      "include": [ "string" ]
   },
   "maxResults": number,
   "network": "string",
   "nextToken": "string",
   "sort": { 
      "sortBy": "string",
      "sortOrder": "string"
   },
   "timeFilter": { 
      "from": { 
         "time": number
      },
      "to": { 
         "time": number
      }
   },
   "voutFilter": { 
      "voutSpent": boolean
   }
}
```

## URI Request Parameters
<a name="API_ListFilteredTransactionEvents_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListFilteredTransactionEvents_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [addressIdentifierFilter](#API_ListFilteredTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListFilteredTransactionEvents-request-addressIdentifierFilter"></a>
This is the unique public address on the blockchain for which the transaction events are being requested.  
Type: [AddressIdentifierFilter](API_AddressIdentifierFilter.md) object  
Required: Yes

 ** [confirmationStatusFilter](#API_ListFilteredTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListFilteredTransactionEvents-request-confirmationStatusFilter"></a>
The container for the `ConfirmationStatusFilter` that filters for the [https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality](https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality) of the results.  
Type: [ConfirmationStatusFilter](API_ConfirmationStatusFilter.md) object  
Required: No

 ** [maxResults](#API_ListFilteredTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListFilteredTransactionEvents-request-maxResults"></a>
The maximum number of transaction events to list.  
Default: `100`   
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
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 250.  
Required: No

 ** [network](#API_ListFilteredTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListFilteredTransactionEvents-request-network"></a>
The blockchain network where the transaction occurred.  
Valid Values: `BITCOIN_MAINNET` \$1 `BITCOIN_TESTNET`   
Type: String  
Required: Yes

 ** [nextToken](#API_ListFilteredTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListFilteredTransactionEvents-request-nextToken"></a>
The pagination token that indicates the next set of results to retrieve.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 131070.  
Required: No

 ** [sort](#API_ListFilteredTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListFilteredTransactionEvents-request-sort"></a>
The order by which the results will be sorted.  
Type: [ListFilteredTransactionEventsSort](API_ListFilteredTransactionEventsSort.md) object  
Required: No

 ** [timeFilter](#API_ListFilteredTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListFilteredTransactionEvents-request-timeFilter"></a>
This container specifies the time frame for the transaction events returned in the response.  
Type: [TimeFilter](API_TimeFilter.md) object  
Required: No

 ** [voutFilter](#API_ListFilteredTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListFilteredTransactionEvents-request-voutFilter"></a>
This container specifies filtering attributes related to BITCOIN\$1VOUT event types  
Type: [VoutFilter](API_VoutFilter.md) object  
Required: No

## Response Syntax
<a name="API_ListFilteredTransactionEvents_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "events": [ 
      { 
         "blockchainInstant": { 
            "time": number
         },
         "confirmationStatus": "string",
         "contractAddress": "string",
         "eventType": "string",
         "from": "string",
         "network": "string",
         "spentVoutIndex": number,
         "spentVoutTransactionHash": "string",
         "spentVoutTransactionId": "string",
         "to": "string",
         "tokenId": "string",
         "transactionHash": "string",
         "transactionId": "string",
         "value": "string",
         "voutIndex": number,
         "voutSpent": boolean
      }
   ],
   "nextToken": "string"
}
```

## Response Elements
<a name="API_ListFilteredTransactionEvents_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [events](#API_ListFilteredTransactionEvents_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListFilteredTransactionEvents-response-events"></a>
The transaction events returned by the request.  
Type: Array of [TransactionEvent](API_TransactionEvent.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 250 items.

 ** [nextToken](#API_ListFilteredTransactionEvents_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListFilteredTransactionEvents-response-nextToken"></a>
The pagination token that indicates the next set of results to retrieve.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 131070.

## Errors
<a name="API_ListFilteredTransactionEvents_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 [AccessDeniedException](API_AccessDeniedException.md)   
The AWS account doesn’t have access to this resource.     
 ** message **   
The container for the exception message.
HTTP Status Code: 403

 [InternalServerException](API_InternalServerException.md)   
The request processing has failed because of an internal error in the service.    
 ** message **   
The container for the exception message.  
 ** retryAfterSeconds **   
Specifies the `retryAfterSeconds` value.
HTTP Status Code: 500

 [ServiceQuotaExceededException](API_ServiceQuotaExceededException.md)   
The service quota has been exceeded for this resource.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 402

 [ThrottlingException](API_ThrottlingException.md)   
The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** retryAfterSeconds **   
The container of the `retryAfterSeconds` value.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 429

 [ValidationException](API_ValidationException.md)   
The resource passed is invalid.    
 ** fieldList **   
The container for the `fieldList` of the exception.  
 ** message **   
The container for the exception message.  
 ** reason **   
The container for the reason for the exception
HTTP Status Code: 400

## See Also
<a name="API_ListFilteredTransactionEvents_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/managedblockchain-query-2023-05-04/ListFilteredTransactionEvents) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/managedblockchain-query-2023-05-04/ListFilteredTransactionEvents) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/managedblockchain-query-2023-05-04/ListFilteredTransactionEvents) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/managedblockchain-query-2023-05-04/ListFilteredTransactionEvents) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/managedblockchain-query-2023-05-04/ListFilteredTransactionEvents) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/managedblockchain-query-2023-05-04/ListFilteredTransactionEvents) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/managedblockchain-query-2023-05-04/ListFilteredTransactionEvents) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/managedblockchain-query-2023-05-04/ListFilteredTransactionEvents) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/managedblockchain-query-2023-05-04/ListFilteredTransactionEvents) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/managedblockchain-query-2023-05-04/ListFilteredTransactionEvents) 

# ListTokenBalances
<a name="API_ListTokenBalances"></a>

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.

## Request Syntax
<a name="API_ListTokenBalances_RequestSyntax"></a>

```
POST /list-token-balances HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "nextToken": "string",
   "ownerFilter": { 
      "address": "string"
   },
   "tokenFilter": { 
      "contractAddress": "string",
      "network": "string",
      "tokenId": "string"
   }
}
```

## URI Request Parameters
<a name="API_ListTokenBalances_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListTokenBalances_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [maxResults](#API_ListTokenBalances_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTokenBalances-request-maxResults"></a>
The maximum number of token balances to return.  
Default: `100`   
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
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 250.  
Required: No

 ** [nextToken](#API_ListTokenBalances_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTokenBalances-request-nextToken"></a>
The pagination token that indicates the next set of results to retrieve.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 131070.  
Required: No

 ** [ownerFilter](#API_ListTokenBalances_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTokenBalances-request-ownerFilter"></a>
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.  
Type: [OwnerFilter](API_OwnerFilter.md) object  
Required: No

 ** [tokenFilter](#API_ListTokenBalances_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTokenBalances-request-tokenFilter"></a>
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.  
You must always specify the network property of this container when using this operation.
Type: [TokenFilter](API_TokenFilter.md) object  
Required: Yes

## Response Syntax
<a name="API_ListTokenBalances_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "tokenBalances": [ 
      { 
         "atBlockchainInstant": { 
            "time": number
         },
         "balance": "string",
         "lastUpdatedTime": { 
            "time": number
         },
         "ownerIdentifier": { 
            "address": "string"
         },
         "tokenIdentifier": { 
            "contractAddress": "string",
            "network": "string",
            "tokenId": "string"
         }
      }
   ]
}
```

## Response Elements
<a name="API_ListTokenBalances_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_ListTokenBalances_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTokenBalances-response-nextToken"></a>
The pagination token that indicates the next set of results to retrieve.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 131070.

 ** [tokenBalances](#API_ListTokenBalances_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTokenBalances-response-tokenBalances"></a>
An array of `TokenBalance` objects. Each object contains details about the token balance.  
Type: Array of [TokenBalance](API_TokenBalance.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 250 items.

## Errors
<a name="API_ListTokenBalances_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 [AccessDeniedException](API_AccessDeniedException.md)   
The AWS account doesn’t have access to this resource.     
 ** message **   
The container for the exception message.
HTTP Status Code: 403

 [InternalServerException](API_InternalServerException.md)   
The request processing has failed because of an internal error in the service.    
 ** message **   
The container for the exception message.  
 ** retryAfterSeconds **   
Specifies the `retryAfterSeconds` value.
HTTP Status Code: 500

 [ServiceQuotaExceededException](API_ServiceQuotaExceededException.md)   
The service quota has been exceeded for this resource.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 402

 [ThrottlingException](API_ThrottlingException.md)   
The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** retryAfterSeconds **   
The container of the `retryAfterSeconds` value.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 429

 [ValidationException](API_ValidationException.md)   
The resource passed is invalid.    
 ** fieldList **   
The container for the `fieldList` of the exception.  
 ** message **   
The container for the exception message.  
 ** reason **   
The container for the reason for the exception
HTTP Status Code: 400

## See Also
<a name="API_ListTokenBalances_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/managedblockchain-query-2023-05-04/ListTokenBalances) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/managedblockchain-query-2023-05-04/ListTokenBalances) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/managedblockchain-query-2023-05-04/ListTokenBalances) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/managedblockchain-query-2023-05-04/ListTokenBalances) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/managedblockchain-query-2023-05-04/ListTokenBalances) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/managedblockchain-query-2023-05-04/ListTokenBalances) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/managedblockchain-query-2023-05-04/ListTokenBalances) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/managedblockchain-query-2023-05-04/ListTokenBalances) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/managedblockchain-query-2023-05-04/ListTokenBalances) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/managedblockchain-query-2023-05-04/ListTokenBalances) 

# ListTransactionEvents
<a name="API_ListTransactionEvents"></a>

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](https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality). 

## Request Syntax
<a name="API_ListTransactionEvents_RequestSyntax"></a>

```
POST /list-transaction-events HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "network": "string",
   "nextToken": "string",
   "transactionHash": "string",
   "transactionId": "string"
}
```

## URI Request Parameters
<a name="API_ListTransactionEvents_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListTransactionEvents_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [maxResults](#API_ListTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactionEvents-request-maxResults"></a>
The maximum number of transaction events to list.  
Default: `100`   
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
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 250.  
Required: No

 ** [network](#API_ListTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactionEvents-request-network"></a>
The blockchain network where the transaction events occurred.  
Type: String  
Valid Values: `ETHEREUM_MAINNET | ETHEREUM_SEPOLIA_TESTNET | BITCOIN_MAINNET | BITCOIN_TESTNET`   
Required: Yes

 ** [nextToken](#API_ListTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactionEvents-request-nextToken"></a>
The pagination token that indicates the next set of results to retrieve.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 131070.  
Required: No

 ** [transactionHash](#API_ListTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactionEvents-request-transactionHash"></a>
The hash of a transaction. It is generated when a transaction is created.  
Type: String  
Pattern: `(0x[A-Fa-f0-9]{64}|[A-Fa-f0-9]{64})`   
Required: No

 ** [transactionId](#API_ListTransactionEvents_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactionEvents-request-transactionId"></a>
The identifier of a Bitcoin transaction. It is generated when a transaction is created.  
 `transactionId` is only supported on the Bitcoin networks.
Type: String  
Pattern: `(0x[A-Fa-f0-9]{64}|[A-Fa-f0-9]{64})`   
Required: No

## Response Syntax
<a name="API_ListTransactionEvents_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "events": [ 
      { 
         "blockchainInstant": { 
            "time": number
         },
         "confirmationStatus": "string",
         "contractAddress": "string",
         "eventType": "string",
         "from": "string",
         "network": "string",
         "spentVoutIndex": number,
         "spentVoutTransactionHash": "string",
         "spentVoutTransactionId": "string",
         "to": "string",
         "tokenId": "string",
         "transactionHash": "string",
         "transactionId": "string",
         "value": "string",
         "voutIndex": number,
         "voutSpent": boolean
      }
   ],
   "nextToken": "string"
}
```

## Response Elements
<a name="API_ListTransactionEvents_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [events](#API_ListTransactionEvents_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactionEvents-response-events"></a>
An array of `TransactionEvent` objects. Each object contains details about the transaction events.  
Type: Array of [TransactionEvent](API_TransactionEvent.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 250 items.

 ** [nextToken](#API_ListTransactionEvents_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactionEvents-response-nextToken"></a>
The pagination token that indicates the next set of results to retrieve.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 131070.

## Errors
<a name="API_ListTransactionEvents_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 [AccessDeniedException](API_AccessDeniedException.md)   
The AWS account doesn’t have access to this resource.     
 ** message **   
The container for the exception message.
HTTP Status Code: 403

 [InternalServerException](API_InternalServerException.md)   
The request processing has failed because of an internal error in the service.    
 ** message **   
The container for the exception message.  
 ** retryAfterSeconds **   
Specifies the `retryAfterSeconds` value.
HTTP Status Code: 500

 [ServiceQuotaExceededException](API_ServiceQuotaExceededException.md)   
The service quota has been exceeded for this resource.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 402

 [ThrottlingException](API_ThrottlingException.md)   
The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** retryAfterSeconds **   
The container of the `retryAfterSeconds` value.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 429

 [ValidationException](API_ValidationException.md)   
The resource passed is invalid.    
 ** fieldList **   
The container for the `fieldList` of the exception.  
 ** message **   
The container for the exception message.  
 ** reason **   
The container for the reason for the exception
HTTP Status Code: 400

## See Also
<a name="API_ListTransactionEvents_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/managedblockchain-query-2023-05-04/ListTransactionEvents) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/managedblockchain-query-2023-05-04/ListTransactionEvents) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/managedblockchain-query-2023-05-04/ListTransactionEvents) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/managedblockchain-query-2023-05-04/ListTransactionEvents) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/managedblockchain-query-2023-05-04/ListTransactionEvents) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/managedblockchain-query-2023-05-04/ListTransactionEvents) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/managedblockchain-query-2023-05-04/ListTransactionEvents) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/managedblockchain-query-2023-05-04/ListTransactionEvents) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/managedblockchain-query-2023-05-04/ListTransactionEvents) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/managedblockchain-query-2023-05-04/ListTransactionEvents) 

# ListTransactions
<a name="API_ListTransactions"></a>

Lists all the transaction events for a transaction.

## Request Syntax
<a name="API_ListTransactions_RequestSyntax"></a>

```
POST /list-transactions HTTP/1.1
Content-type: application/json

{
   "address": "string",
   "confirmationStatusFilter": { 
      "include": [ "string" ]
   },
   "fromBlockchainInstant": { 
      "time": number
   },
   "maxResults": number,
   "network": "string",
   "nextToken": "string",
   "sort": { 
      "sortBy": "string",
      "sortOrder": "string"
   },
   "toBlockchainInstant": { 
      "time": number
   }
}
```

## URI Request Parameters
<a name="API_ListTransactions_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListTransactions_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [address](#API_ListTransactions_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactions-request-address"></a>
The address (either a contract or wallet), whose transactions are being requested.  
Type: String  
Pattern: `[-A-Za-z0-9]{13,74}`   
Required: Yes

 ** [confirmationStatusFilter](#API_ListTransactions_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactions-request-confirmationStatusFilter"></a>
This filter is used to include transactions in the response that haven't reached [https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality](https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality). Transactions that have reached finality are always part of the response.  
Type: [ConfirmationStatusFilter](API_ConfirmationStatusFilter.md) object  
Required: No

 ** [fromBlockchainInstant](#API_ListTransactions_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactions-request-fromBlockchainInstant"></a>
The container for time.  
Type: [BlockchainInstant](API_BlockchainInstant.md) object  
Required: No

 ** [maxResults](#API_ListTransactions_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactions-request-maxResults"></a>
The maximum number of transactions to list.  
Default: `100`   
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
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 250.  
Required: No

 ** [network](#API_ListTransactions_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactions-request-network"></a>
The blockchain network where the transactions occurred.  
Type: String  
Valid Values: `ETHEREUM_MAINNET | ETHEREUM_SEPOLIA_TESTNET | BITCOIN_MAINNET | BITCOIN_TESTNET`   
Required: Yes

 ** [nextToken](#API_ListTransactions_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactions-request-nextToken"></a>
The pagination token that indicates the next set of results to retrieve.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 131070.  
Required: No

 ** [sort](#API_ListTransactions_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactions-request-sort"></a>
The order by which the results will be sorted.   
Type: [ListTransactionsSort](API_ListTransactionsSort.md) object  
Required: No

 ** [toBlockchainInstant](#API_ListTransactions_RequestSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactions-request-toBlockchainInstant"></a>
The container for time.  
Type: [BlockchainInstant](API_BlockchainInstant.md) object  
Required: No

## Response Syntax
<a name="API_ListTransactions_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "transactions": [ 
      { 
         "confirmationStatus": "string",
         "network": "string",
         "transactionHash": "string",
         "transactionId": "string",
         "transactionTimestamp": number
      }
   ]
}
```

## Response Elements
<a name="API_ListTransactions_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_ListTransactions_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactions-response-nextToken"></a>
The pagination token that indicates the next set of results to retrieve.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 131070.

 ** [transactions](#API_ListTransactions_ResponseSyntax) **   <a name="ManagedBlockchainQueryAPIReference-ListTransactions-response-transactions"></a>
The array of transactions returned by the request.  
Type: Array of [TransactionOutputItem](API_TransactionOutputItem.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 250 items.

## Errors
<a name="API_ListTransactions_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 [AccessDeniedException](API_AccessDeniedException.md)   
The AWS account doesn’t have access to this resource.     
 ** message **   
The container for the exception message.
HTTP Status Code: 403

 [InternalServerException](API_InternalServerException.md)   
The request processing has failed because of an internal error in the service.    
 ** message **   
The container for the exception message.  
 ** retryAfterSeconds **   
Specifies the `retryAfterSeconds` value.
HTTP Status Code: 500

 [ServiceQuotaExceededException](API_ServiceQuotaExceededException.md)   
The service quota has been exceeded for this resource.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** resourceId **   
The `resourceId` of the resource that caused the exception.  
 ** resourceType **   
The `resourceType` of the resource that caused the exception.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 402

 [ThrottlingException](API_ThrottlingException.md)   
The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.    
 ** message **   
The container for the exception message.  
 ** quotaCode **   
The container for the `quotaCode`.  
 ** retryAfterSeconds **   
The container of the `retryAfterSeconds` value.  
 ** serviceCode **   
The container for the `serviceCode`.
HTTP Status Code: 429

 [ValidationException](API_ValidationException.md)   
The resource passed is invalid.    
 ** fieldList **   
The container for the `fieldList` of the exception.  
 ** message **   
The container for the exception message.  
 ** reason **   
The container for the reason for the exception
HTTP Status Code: 400

## See Also
<a name="API_ListTransactions_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/managedblockchain-query-2023-05-04/ListTransactions) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/managedblockchain-query-2023-05-04/ListTransactions) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/managedblockchain-query-2023-05-04/ListTransactions) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/managedblockchain-query-2023-05-04/ListTransactions) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/managedblockchain-query-2023-05-04/ListTransactions) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/managedblockchain-query-2023-05-04/ListTransactions) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/managedblockchain-query-2023-05-04/ListTransactions) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/managedblockchain-query-2023-05-04/ListTransactions) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/managedblockchain-query-2023-05-04/ListTransactions) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/managedblockchain-query-2023-05-04/ListTransactions) 