Use the Time-series API for charting data over time and to generate reports. Time-series use the same underlying data as the Table API, but rows are automatically aggregated and counted over time.
The time-series API is an abstraction over tables which allows for server-side aggregation of multiple result rows over time. Time-series are meant to be displayed as graphs with time on the x-axis and some aggregate value on the y-axis. Since the underlying data is still in tabular form all table filters work on time-series as well.
Note that this time-series API does not fill gaps. That means when the underlying table contains no data for a particular time interval, the corresponding time-series row will be missing. Clients should be prepared for this case and fill gaps if required.
Intervals between timestamps are equally spaced and can be controlled by the
collapsequery parameter, i.e.
1dmeans each interval contains 24 hours of aggregated data. Time-series data can contain fields of all supported numeric data types (e.g. no strings or binary data). The aggregation function is fixed by the semantics of the data type. This may either be a sum, a count, first, last, min, max or mean value.
historic end-of-block balances for all accounts
aggregated block data
aggregated balances, freezer and delegation flows
aggregated operations data
running total counters for on-chain operations, accounts and rolls
running supply totals
Time-series datasets support the following query parameters.
Comma separated list of columns you like to fetch. Bulk array results will be ordered accordingly. Default is all defined columns for a series.
Aggregate numeric data over different sampling intervals. Supported values are
Return data in
Maximum number of aggregated results returned. Limited to 50,000, default 500.
When only start or end date are provided, the other end of the range is deducted from collapse and limit. I.e. with collapse of
1dand limit of
30you'll get 30 days of data after start_date or before end_date. Called without any optional parameters a query defaults to the most recent 500 minutes (
Time-series support the same filters used on tables with the same filter expressions of form
<column>.<operator>=<arg>. Filters can be used on all table fields, including fields that are not part of the aggregated result such as addresses and type enums.