Granite Upgrade Activates in11d:16h:54m:33s
Chain Metrics

Get ICM timeseries metrics

Get historical ICM message counts with flexible grouping.

Use filters (srcBlockchainId, destBlockchainId, network) to select data, and the groupBy parameter for aggregation level.

Examples:

  • Specific pair: ?srcBlockchainId=...&destBlockchainId=...

  • From one source (aggregated): ?srcBlockchainId=...

  • From one source (by destination): ?srcBlockchainId=...&groupBy=destBlockchainId

  • To one destination (aggregated): ?destBlockchainId=...

  • To one destination (by source): ?destBlockchainId=...&groupBy=srcBlockchainId

  • Network total: ?network=mainnet

  • Network breakdown: ?network=mainnet&groupBy=srcBlockchainId,destBlockchainId.

GET
/v2/icm/timeseries

Query Parameters

startTimestamp?integer

Query param for retrieving items after a specific timestamp.

Range0 <= value
endTimestamp?integer

Query param for retrieving items before a specific timestamp.

Range0 <= value
srcBlockchainId?string

Query param for retrieving items for a specific source (initiating) blockchain id.

destBlockchainId?string

Query param for retrieving items for a specific destination (receiving) blockchain id.

timeInterval?string

Time interval granularity for data aggregation. Metrics prefixed with "cumulative", "max", or "avg" only support timeInterval equal to "day".

Value in"hour" | "day" | "week" | "month"
pageToken?string

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

pageSize?integer

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

Default100
Range1 <= value <= 2160
groupBy?string

Group results by srcBlockchainId, destBlockchainId, or both (comma-separated)

Value in"srcBlockchainId" | "destBlockchainId" | "srcBlockchainId,destBlockchainId"
network?string

Either mainnet or testnet/fuji.

Value in"mainnet" | "fuji" | "testnet"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://metrics.avax.network/v2/icm/timeseries?startTimestamp=1689541049&endTimestamp=1689800249&timeInterval=day&pageSize=10&groupBy=destBlockchainId&network=mainnet"
{
  "nextPageToken": "string",
  "results": [
    {
      "value": 0,
      "timestamp": 0,
      "srcBlockchainId": "string",
      "destBlockchainId": "string"
    }
  ]
}
{
  "message": "string",
  "statusCode": 400,
  "error": "Bad Request"
}
{
  "message": "string",
  "statusCode": 401,
  "error": "Unauthorized"
}
{
  "message": "string",
  "statusCode": 403,
  "error": "Forbidden"
}
{
  "message": "string",
  "statusCode": 404,
  "error": "Not Found"
}
{
  "message": "string",
  "statusCode": 429,
  "error": "Too Many Requests"
}
{
  "message": "string",
  "statusCode": 500,
  "error": "Internal Server Error"
}
{
  "message": "string",
  "statusCode": 502,
  "error": "Bad Gateway"
}
{
  "message": "string",
  "statusCode": 503,
  "error": "Service Unavailable"
}

Is this guide helpful?