---
title: "Get a technical indicator series"
url: https://docs.truemarkets.co/api/market-data/get-price-indicators
description: "Returns one or more technical indicator lines computed from the asset's"
---

Docs index: https://docs.truemarkets.co/llms.txt

# Get a technical indicator series

```
GET https://api.truemarkets.co/v1/defi/market/prices/indicators
```

Returns one or more technical indicator lines computed from the asset's
close prices.

The requested `window` is widened internally by the indicator's warm-up
depth and trimmed back before responding, so the first returned point is
already converged rather than carrying seed bias. The window is measured
back from the most recent available point, so a feed lagging behind the
current time still returns a full window.

`lines` is keyed by line name. Single-line indicators (`sma`, `ema`,
`rsi`, `atr`) return one entry named after the indicator. `macd`
returns `macd`, `signal` and `histogram`; `bollinger` returns `upper`,
`middle`, `lower` and `percent_b`.

`atr` reads OHLC candles rather than closes, so it is only available
for assets whose price source stores individual ticks; anything else
returns `400`. It is Wilder-smoothed and defaults to a period of 14.

The momentum measures cover fixed spans rather than a caller-supplied
`period`, which is rejected for them. `surging_1h`, `surging_4h` and
`surging_24h` are the percent price change over that span, so the
`resolution` must be coarse enough for the span to fit in 400 buckets —
the same bound a supplied `period` carries.
`trending_ratio` is average reported 24h volume over the last 6 hours
divided by its 30-day average, so it needs a CoinGecko-mapped asset and
a `resolution` of at least `1h`.

VWAP is not offered: it needs per-bucket traded volume, which no price
series carries.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `asset_id` | query | string (uuid) | no | Backend asset ID. Mutually exclusive with `symbol`: exactly one of the two is required, and naming both is a 400. |
| `symbol` | query | string | no | Asset symbol (e.g. SOL, BTC) |
| `indicator` | query | string, one of `sma`, `ema`, `rsi`, `macd`, `bollinger`, `atr`, `surging_1h`, `surging_4h`, `surging_24h`, `trending_ratio` | yes |  |
| `window` | query | string | no | Time window for the series (e.g. 1d, 7d, 1M) |
| `resolution` | query | string | no | Candle size the period counts in (e.g. 1m, 1h, 1d) |
| `period` | query | integer | no | Lookback in candles. Required for sma, ema and rsi; defaults to 20 for bollinger and 14 for atr, and is not used by macd. Rejected for the momentum measures, which cover a fixed span. |
| `fast_period` | query | integer | no | MACD fast EMA length. Defaults to 12. |
| `slow_period` | query | integer | no | MACD slow EMA length. Defaults to 26; must exceed fast_period. |
| `signal_period` | query | integer | no | MACD signal EMA length. Defaults to 9. |
| `std_dev` | query | number | no | Bollinger band width in standard deviations. Defaults to 2. |
| `asset_class` | query | string | no |  |

## Responses

Every error status returns the same body, described in [Errors](https://docs.truemarkets.co/developer-resources/errors.md).

### 200

Indicator lines

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `asset_id` | string (uuid) | no | Backend asset ID. Absent on the CeFi routes. |
| `symbol` | string | no |  |
| `window` | string | no |  |
| `resolution` | string | no |  |
| `indicator` | string | no |  |
| `lines` | object | no | Indicator lines keyed by line name |

### 400

Unknown indicator, or a parameter out of range

### 404

Not enough price history to compute the indicator

### 500

Internal server error
