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

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

async function run() {
  const result = await avaCloudSDK.metrics.evm.chains.listChains({
    network: "mainnet",
  });

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

run();
{
  "nextPageToken": "<string>",
  "chains": [
    {
      "evmChainId": 43114,
      "chainName": "c_chain",
      "blockchainId": "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5",
      "subnetId": "11111111111111111111111111111111LpoYY",
      "network": "mainnet"
    }
  ]
}

Query Parameters

pageToken
string

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

network
enum<string>

Either mainnet or testnet/fuji.

Available options:
mainnet,
fuji,
testnet,
devnet

Response

200
application/json
Successful response
chains
object[]
required

Array of Subnet - EVM Chain ID mappings whose metrics we support.

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.