The asset ID to look up.
Execute the request.
Additional headers to send in the request. Optional.
A promise which resolves to the response data.
Prepare a JSON response before returning it.
Use this method to change and restructure response
data as needed after receiving it from the do()
method.
Response body received
Configure how integers in this request's JSON response will be decoded.
The options are:
The method to use when parsing the response for this request. Must be one of "default", "safe", "mixed", or "bigint".
/v2/assets/${index}/balances
Filtered results should have an asset balance greater than this value.
const assetId = 163650;
const minBalance = 1000000;
const assetBalances = await indexerClient
.lookupAssetBalances(assetId)
.currencyGreaterThan(minBalance)
.do();
Filtered results should have an asset balance less than this value.
const assetId = 163650;
const maxBalance = 2000000;
const assetBalances = await indexerClient
.lookupAssetBalances(assetId)
.currencyLessThan(maxBalance)
.do();
Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
Limit results for pagination.
const assetId = 163650;
const maxResults = 20;
const assetBalances = await indexerClient
.lookupAssetBalances(assetId)
.limit(maxResults)
.do();
maximum number of results to return.
Specify the next page of results.
const assetId = 163650;
const maxResults = 20;
const assetBalancesPage1 = await indexerClient
.lookupAssetBalances(assetId)
.limit(maxResults)
.do();
const assetBalancesPage2 = await indexerClient
.lookupAssetBalances(assetId)
.limit(maxResults)
.nextToken(assetBalancesPage1["next-token"])
.do();
provided by the previous results.
Generated using TypeDoc
Returns the list of accounts which hold the given asset and their balance.
Example
Response data schema details