- Docs
- Api%2Freference%2Fexplorer%2FGetPublicBatchStats
Batch statistics
Summarize batches created in a selected time window. `from` is inclusive and `to` is exclusive; omit both to cover the network's complete batch history. The response always includes `total`. When the window is not empty it also reports its highest sequence number, average actions per batch and average creation interval. Finalized batches contribute an average duration from batch creation to finalization. Add `include=breakdown&group_by=status` to count the selected batches by their current pipeline stage. Add `include=series` to count batch creation by time bucket. These optional aggregations require extra work, so they are omitted by default. These figures cover the whole network and take no sign-in.
Query Parameters
Start of the window, inclusive. Omit for "since the beginning". Replaces the when_created[$gt] and when_created[$gte] pair: an aggregate has no use for both an open and a closed lower bound.
date-timeEnd of the window, exclusive. Omit for "up to now". Half-open with from, so adjacent windows tile without double-counting the boundary record.
date-timeWhich optional parts of the aggregate to compute. The total is always returned; a breakdown and a series each cost a grouping pass, so a caller that only needs the headline number does not pay for them.
Bucket size for a time series. It fixes how many points the series has over the requested window, so a long window with a small interval is an expensive request.
"week""hour" | "day" | "week" | "month" | "year"How many groups to keep in a breakdown, largest first. Bounds the response for a high-cardinality dimension such as template, where an organization may have thousands.
It does not bound a series. The number of buckets in a series is already fixed by from, to and interval; capping it separately would silently truncate the window a caller explicitly asked for.
10int64Group the optional breakdown by each batch's current pipeline status.
This does not split the time series, which always counts all new batches
in each interval.
"status"Response Body
application/json
application/json
application/json
curl -X GET "https://api.dual.network/public/stats/batches"{
"total": 978,
"latest_sequence": 978,
"avg_actions_per_batch": 2.9,
"avg_interval_seconds": 8231.5,
"avg_finality_seconds": 14654.2
}{
"code": 3,
"message": "Key: 'limit' Error:Field validation for 'limit' failed on the 'lte' tag"
}{
"code": 13,
"message": "internal error"
}