🔍

These endpoints let you supply OHLCV candle data directly and receive indicator calculations on it. Use this for backtesting, proprietary data sources, or any scenario where you already have candles and don't want TAAPI to fetch them from an exchange.

Two endpoints are available:

Results from these endpoints are never cached. Each request is computed fresh.

Candle formats

Both endpoints accept candle objects in two equivalent formats. Use whichever is more convenient — they produce identical results.

Field (long form)Field (short form)TypeDescription
timestamptintegerUnix timestamp (seconds) of the candle open. Optional but recommended.
openonumberOpening price.
highhnumberHighest price.
lowlnumberLowest price.
closecnumberClosing price.
volumevnumberTrading volume.

Maximum 500 candles per request. Short-form field names reduce payload size.

POST /indicator/{indicator}

Compute one indicator on a user-supplied candle array.

POST /indicator/{indicator}

Request body

FieldTypeRequiredDescription
candlesarrayYesArray of OHLCV candle objects (max 500). Ordered oldest to newest.
[indicator params]variesNoAny indicator-specific parameters, same as the GET version (e.g. "period": 14).
curl -X POST https://v2.taapi.io/indicator/rsi \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "period": 3,
    "candles": [
      { "t": 1708200000, "o": 50000, "h": 51000, "l": 49500, "c": 50500, "v": 100 },
      { "t": 1708203600, "o": 50500, "h": 51500, "l": 50000, "c": 51000, "v": 120 },
      { "t": 1708207200, "o": 51000, "h": 52000, "l": 50800, "c": 51800, "v": 95  },
      { "t": 1708210800, "o": 51800, "h": 52500, "l": 51500, "c": 52000, "v": 110 },
      { "t": 1708214400, "o": 52000, "h": 52200, "l": 51000, "c": 51200, "v": 130 }
    ]
  }'
const res = await fetch('https://v2.taapi.io/indicator/rsi', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    period: 3,
    candles: [
      { t: 1708200000, o: 50000, h: 51000, l: 49500, c: 50500, v: 100 },
      { t: 1708203600, o: 50500, h: 51500, l: 50000, c: 51000, v: 120 },
      { t: 1708207200, o: 51000, h: 52000, l: 50800, c: 51800, v: 95  },
      { t: 1708210800, o: 51800, h: 52500, l: 51500, c: 52000, v: 110 },
      { t: 1708214400, o: 52000, h: 52200, l: 51000, c: 51200, v: 130 },
    ],
  }),
});
const data = await res.json();
import requests, json

payload = {
    "period": 3,
    "candles": [
        {"t": 1708200000, "o": 50000, "h": 51000, "l": 49500, "c": 50500, "v": 100},
        {"t": 1708203600, "o": 50500, "h": 51500, "l": 50000, "c": 51000, "v": 120},
        {"t": 1708207200, "o": 51000, "h": 52000, "l": 50800, "c": 51800, "v": 95},
        {"t": 1708210800, "o": 51800, "h": 52500, "l": 51500, "c": 52000, "v": 110},
        {"t": 1708214400, "o": 52000, "h": 52200, "l": 51000, "c": 51200, "v": 130},
    ],
}
resp = requests.post(
    'https://v2.taapi.io/indicator/rsi',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json',
    },
    data=json.dumps(payload)
)
print(resp.json())

Response

200 OK
{ "value": 32.78, "backtrack": 0 }
Note: The data injection single-indicator response returns value as a scalar (not an array) along with a backtrack field. This differs from the exchange-fetch GET /indicator/{indicator} response, which always wraps results in arrays with a timestamp field.

POST /bulk-candles

Compute multiple indicators across one or more candle series in one request. Works like POST /bulk but each construct carries its own candle array instead of an exchange + symbol + timeframe.

POST /bulk-candles

Request body

FieldTypeRequiredDefaultDescription
constructsarrayYes1–20 construct objects.
verbosebooleanNofalseWhen true, wraps each result in a metadata envelope.

Construct object (bulk-candles)

FieldTypeRequiredDescription
idstringYesUnique key in the response. Alphanumeric + underscores only.
candlesarrayYesOHLCV candle array (max 500). Ordered oldest to newest.
indicatorsarrayYes1–20 indicator objects, same structure as in POST /bulk.
bulk-candles — example request
{
  "constructs": [
    {
      "id": "series_a",
      "candles": [
        { "t": 1708200000, "o": 50000, "h": 51000, "l": 49500, "c": 50500, "v": 100 },
        { "t": 1708203600, "o": 50500, "h": 51500, "l": 50000, "c": 51000, "v": 120 },
        { "t": 1708207200, "o": 51000, "h": 52000, "l": 50800, "c": 51800, "v": 95  }
      ],
      "indicators": [
        { "id": "rsi3", "indicator": "rsi", "period": 3 },
        { "id": "ema2", "indicator": "ema", "period": 2 }
      ]
    }
  ]
}
Response
{
  "series_a": {
    "rsi3": { "value": 32.78, "backtrack": 0 },
    "ema2": { "value": 51400.0, "backtrack": 0 }
  }
}