Time series commands

Lists time series commands and provides links to the command reference pages.

The following table lists time series commands. See the command links for more information about each command's syntax, arguments, and examples.

Command Redis
Software
Redis
Cloud
Description
TS.ADD ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Appends a sample to a time series.
TS.ALTER ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Updates the retention, chunk size, duplicate policy, or labels for an existing time series.
TS.CREATE ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Creates a new time series.
TS.CREATERULE ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Creates a compaction rule for downsampling.
TS.DECRBY ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Decreases the value of the latest sample in a time series by the specified number. Either modifies the existing sample or adds the decreased value as a new sample, depending on the timestamp option.
TS.DEL ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Removes all samples between two timestamps for a given time series.
TS.DELETERULE ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Removes a compaction rule.
TS.GET ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Returns the last sample in a time series.
TS.INCRBY ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Increases the value of the latest sample in a time series by the specified number. Either modifies the existing sample or adds the increased value as a new sample, depending on the timestamp option.
TS.INFO ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Returns time series information and statistics.
TS.MADD ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Appends multiple samples to one or more time series.
TS.MGET ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Returns multiple samples with labels that match the filter.
TS.MRANGE ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
For multiple time series, runs a query against samples within a range of timestamps, from earliest to latest. Supports filtering and aggregation.
TS.MREVRANGE ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
For multiple time series, runs a query against samples within a range of timestamps in reverse order, from latest to earliest. Supports filtering and aggregation.
TS.NRANGE ❌ Not supported

❌ Flexible & Annual
❌ Free & Fixed
Query a range across multiple time series in forward direction, returning the results grouped by timestamp.
TS.NREVRANGE ❌ Not supported

❌ Flexible & Annual
❌ Free & Fixed
Query a range across multiple time series in reverse direction, returning the results grouped by timestamp.
TS.QUERYINDEX ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
Returns the keys of all time series with labels that match the given filters.
TS.QUERYLABELS ❌ Not supported

❌ Flexible & Annual
❌ Free & Fixed
Returns all label names, or all values of a given label, for time series matching a filter list, or all series.
TS.READ ❌ Not supported

❌ Flexible & Annual
❌ Free & Fixed
Read a batch of time series samples at or after a given timestamp, returning up to max_count of the oldest qualifying samples ordered by increasing timestamp. By default TS.READ returns immediately with whatever is available; add the optional BLOCK keyword to wait until at least min_count samples exist or milliseconds elapse, whichever occurs first.
TS.RANGE ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
From the start of a single time series, runs a query against samples within a range of timestamps. Supports filtering and aggregation.
TS.REVRANGE ✅ Supported

✅ Flexible & Annual
✅ Free & Fixed
From the end of a single time series, runs a query against samples within a range of timestamps in reverse order. Supports filtering and aggregation.
RATE THIS PAGE
Back to top ↑