# Time series commands

```json metadata
{
  "schema_version": 2,
  "title": "Time series commands",
  "description": "Lists time series commands and provides links to the command reference pages.",
  "categories": ["docs","operate","stack"],
  "tableOfContents": {"sections":[]}

,
  "codeExamples": []
}
```


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

| Command | Redis<br />Software | Redis<br />Cloud | Description |
|:--------|:----------------------|:-----------------|:------|
| [TS.ADD](https://redis.io/docs/latest/commands/ts.add) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported"><nobr>&#x2705; Flexible & Annual</nobr></span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Appends a sample to a time series. |
| [TS.ALTER](https://redis.io/docs/latest/commands/ts.alter) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Updates the retention, chunk size, duplicate policy, or labels for an existing time series. |
| [TS.CREATE](https://redis.io/docs/latest/commands/ts.create) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Creates a new time series. |
| [TS.CREATERULE](https://redis.io/docs/latest/commands/ts.createrule) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Creates a compaction rule for [downsampling](https://redis.io/docs/latest/develop/data-types/timeseries#aggregation). |
| [TS.DECRBY](https://redis.io/docs/latest/commands/ts.decrby) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | 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](https://redis.io/docs/latest/commands/ts.del) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Removes all samples between two timestamps for a given time series. |
| [TS.DELETERULE](https://redis.io/docs/latest/commands/ts.deleterule) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Removes a compaction rule. |
| [TS.GET](https://redis.io/docs/latest/commands/ts.get) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Returns the last sample in a time series. |
| [TS.INCRBY](https://redis.io/docs/latest/commands/ts.incrby) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | 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](https://redis.io/docs/latest/commands/ts.info) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Returns time series information and statistics. |
| [TS.MADD](https://redis.io/docs/latest/commands/ts.madd) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Appends multiple samples to one or more time series. |
| [TS.MGET](https://redis.io/docs/latest/commands/ts.mget) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Returns multiple samples with [labels](https://redis.io/docs/latest/develop/data-types/timeseries#create-a-time-series) that match the filter. |
| [TS.MRANGE](https://redis.io/docs/latest/commands/ts.mrange) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | For multiple time series, runs a query against samples within a range of timestamps, from earliest to latest. Supports [filtering](https://redis.io/docs/latest/develop/data-types/timeseries#query-data-points) and [aggregation](https://redis.io/docs/latest/develop/data-types/timeseries#aggregation). |
| [TS.MREVRANGE](https://redis.io/docs/latest/commands/ts.mrevrange) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | For multiple time series, runs a query against samples within a range of timestamps in reverse order, from latest to earliest. Supports [filtering](https://redis.io/docs/latest/develop/data-types/timeseries#query-data-points) and [aggregation](https://redis.io/docs/latest/develop/data-types/timeseries#aggregation). |
| [TS.NRANGE](https://redis.io/docs/latest/commands/ts.nrange) | <span title="Not supported">&#x274c; Not supported</span><br /><span><br /></span> | <span title="Not supported">&#x274c; Flexible & Annual</span><br /><span title="Not supported">&#x274c; Free & Fixed</nobr></span> | Query a range across multiple time series in forward direction, returning the results grouped by timestamp. |
| [TS.NREVRANGE](https://redis.io/docs/latest/commands/ts.nrevrange) | <span title="Not supported">&#x274c; Not supported</span><br /><span><br /></span> | <span title="Not supported">&#x274c; Flexible & Annual</span><br /><span title="Not supported">&#x274c; Free & Fixed</nobr></span> | Query a range across multiple time series in reverse direction, returning the results grouped by timestamp. |
| [TS.QUERYINDEX](https://redis.io/docs/latest/commands/ts.queryindex) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Returns the keys of all time series with [labels](https://redis.io/docs/latest/develop/data-types/timeseries#create-a-time-series) that match the given filters. |
| [TS.QUERYLABELS](https://redis.io/docs/latest/commands/ts.querylabels) | <span title="Not supported">&#x274c; Not supported</span><br /><span><br /></span> | <span title="Not supported">&#x274c; Flexible & Annual</span><br /><span title="Not supported">&#x274c; Free & Fixed</nobr></span> | Returns all label names, or all values of a given label, for time series matching a filter list, or all series. |
| [TS.READ](https://redis.io/docs/latest/commands/ts.read) | <span title="Not supported">&#x274c; Not supported</span><br /><span><br /></span> | <span title="Not supported">&#x274c; Flexible & Annual</span><br /><span title="Not supported">&#x274c; Free & Fixed</nobr></span> | 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](https://redis.io/docs/latest/commands/ts.range) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | From the start of a single time series, runs a query against samples within a range of timestamps. Supports [filtering](https://redis.io/docs/latest/develop/data-types/timeseries#query-data-points) and [aggregation](https://redis.io/docs/latest/develop/data-types/timeseries#aggregation). |
| [TS.REVRANGE](https://redis.io/docs/latest/commands/ts.revrange) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | From the end of a single time series, runs a query against samples within a range of timestamps in reverse order. Supports [filtering](https://redis.io/docs/latest/develop/data-types/timeseries#query-data-points) and [aggregation](https://redis.io/docs/latest/develop/data-types/timeseries#aggregation). |

