GET
/
v2
/
chains
/
{chainId}
/
contracts
/
{address}
/
balances
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";

const avaCloudSDK = new AvaCloudSDK({
  chainId: "43114",
  network: "mainnet",
});

async function run() {
  const result = await avaCloudSDK.metrics.lookingGlass.getAddressesByBalanceOverTime({
    threshold: "1000000",
    startTimestamp: 1689541049,
    endTimestamp: 1689800249,
    chainId: "43114",
    address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
  });

  for await (const page of result) {
    // Handle the page
    console.log(page);
  }
}

run();
{
  "nextPageToken": "<string>",
  "addresses": [
    {
      "address": "0x1234567890abcdef1234567890abcdef123456789",
      "sortKey": 123
    }
  ]
}

Path Parameters

chainId
string
required

A supported evm chain id. Use the /chains endpoint to get a list of supported chain ids.

address
string
required

Contract address on the relevant chain.

Query Parameters

threshold
string
required

The minimum balance for which addresses should be considered.

startTimestamp
integer

Query param for retrieving items after a specific timestamp.

Required range: x > 0
endTimestamp
integer

Query param for retrieving items before a specific timestamp.

Required range: x > 0
pageToken
string

A page token, received from a previous list call. Provide this to retrieve the subsequent page.

pageSize
integer
default:
1000

The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 5000.

Required range: 1 < x < 5000

Response

200
application/json
Successful response
addresses
object[]
required

List of addresses that match provided criteria.

nextPageToken
string

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.