token_balances
Creates, updates, deletes, gets or lists a token_balances resource.
Overview
| Name | token_balances |
| Type | Resource |
| Id | aws.managedblockchain_query.token_balances |
Fields
The following fields are returned by SELECT queries:
- get_token_balance
- list_token_balances
- batch_get_token_balance
| Name | Datatype | Description |
|---|---|---|
at_blockchain_instant | object | The container for time. |
balance | string | The container for the token balance. |
last_updated_time | object | The container for time. |
owner_identifier | object | The container for the owner identifier. |
token_identifier | object | 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. |
| Name | Datatype | Description |
|---|---|---|
at_blockchain_instant | object | The container for time. |
balance | string | The container of the token balance. |
last_updated_time | object | The container for time. |
owner_identifier | object | The container for the owner identifier. |
token_identifier | object | 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. |
| Name | Datatype | Description |
|---|---|---|
errors | array | An array of BatchGetTokenBalanceErrorItem objects returned from the request. |
token_balances | array | An array of BatchGetTokenBalanceOutputItem objects returned by the response. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_token_balance | select | region | Gets the balance of a specific token, including native tokens, for a given address (wallet or contract) on the blockchain. Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported. | |
list_token_balances | select | region | 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. You must always specify the network property of the tokenFilter when using this operation. | |
batch_get_token_balance | select | region | Gets the token balance for a batch of tokens by using the BatchGetTokenBalance action for every token in the request. Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_token_balance
- list_token_balances
- batch_get_token_balance
Gets the balance of a specific token, including native tokens, for a given address (wallet or contract) on the blockchain. Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.
SELECT
at_blockchain_instant,
balance,
last_updated_time,
owner_identifier,
token_identifier
FROM aws.managedblockchain_query.token_balances
WHERE region = '{{ region }}' -- required
;
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. You must always specify the network property of the tokenFilter when using this operation.
SELECT
at_blockchain_instant,
balance,
last_updated_time,
owner_identifier,
token_identifier
FROM aws.managedblockchain_query.token_balances
WHERE region = '{{ region }}' -- required
;
Gets the token balance for a batch of tokens by using the BatchGetTokenBalance action for every token in the request. Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.
SELECT
errors,
token_balances
FROM aws.managedblockchain_query.token_balances
WHERE region = '{{ region }}' -- required
;