import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
chainId: "43114",
});
async function run() {
const result = await avalanche.metrics.chains.listTokenHoldersAboveThreshold({
threshold: "1000000",
startTimestamp: 1689541049,
endTimestamp: 1689800249,
pageSize: 10,
address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"addresses": [
{
"address": "<string>",
"sortKey": "<string>"
}
],
"nextPageToken": "<string>"
}Get list of addresses and their latest balances that have held more than a certain threshold of a given token during the specified time frame.
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
chainId: "43114",
});
async function run() {
const result = await avalanche.metrics.chains.listTokenHoldersAboveThreshold({
threshold: "1000000",
startTimestamp: 1689541049,
endTimestamp: 1689800249,
pageSize: 10,
address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"addresses": [
{
"address": "<string>",
"sortKey": "<string>"
}
],
"nextPageToken": "<string>"
}A supported evm chain id. Use the /chains endpoint to get a list of supported chain ids.
Contract address on the relevant chain.
The minimum balance for which addresses should be considered.
Query param for retrieving items after a specific timestamp.
x >= 0Query param for retrieving items before a specific timestamp.
x >= 0A page token, received from a previous list call. Provide this to retrieve the subsequent page.
The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 5000.
1 <= x <= 5000Was this page helpful?