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.
Query Parameters
Query param for retrieving items after a specific timestamp.
0 <= valueQuery param for retrieving items before a specific timestamp.
0 <= valueQuery param for retrieving items for a specific source (initiating) blockchain id.
Query param for retrieving items for a specific destination (receiving) blockchain id.
Time interval granularity for data aggregation. Metrics prefixed with "cumulative", "max", or "avg" only support timeInterval equal to "day".
"hour" | "day" | "week" | "month"A 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 2160.
1001 <= value <= 2160Group results by srcBlockchainId, destBlockchainId, or both (comma-separated)
"srcBlockchainId" | "destBlockchainId" | "srcBlockchainId,destBlockchainId"Either mainnet or testnet/fuji.
"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?