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

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

async function run() {
  const result = await avaCloudSDK.metrics.chain.metrics.getTeleporterMetricsByChain({
    metric: "teleporterSourceTxnCount",
    chainId: "43114",
  });

  // Handle the result
  console.log(result);
}

run();
{
  "result": {
    "value": 123
  }
}

Path Parameters

metric
enum<string>
required

Which chain level teleporter metric to fetch.

Available options:
teleporterSourceTxnCount,
teleporterDestinationTxnCount,
teleporterTotalTxnCount
chainId
string
required

A supported EVM chain ID or one of "total", "mainnet", or "testnet". Use the /chains endpoint to get a list of supported chain IDs.

Response

200
application/json
Successful response
result
object
required

current metrics value for a given teleporter metric.