Migrating from v1

Move an integration from api.taapi.io (v1) to v2.taapi.io, step by step.


v2 serves the same indicators on the same exchanges and timeframes, and returns the same values. Most of the migration is mechanical: a new key in a header, a new URL, a few renamed parameters, and values that now come back as arrays. This page lists every difference, with a v1 and a v2 version of each request.

v1 keeps working. Your v1 key and integration continue to work as they do today. We will announce the v1 end date well in advance, so you can migrate one part of your integration at a time.

At a glance

v1v2
Base URLhttps://api.taapi.iohttps://v2.taapi.io
API keyLegacy API key (v1)Production key, starts with taapi_live_sk_
Authenticationsecret in the query string or bodyAuthorization: Bearer YOUR_API_KEY header
Indicator URLGET /rsiGET /indicator/rsi
Timeframe parameterintervaltimeframe
Symbol formatBTC/USDTBTCUSDT (no slash)
US stockstype=stocksexchange=stocks
Response valuesPlain numbers: {"value": 54.1}Arrays with timestamps: {"value": [54.1], "timestamp": [1795438800]}
Result timestampaddResultTimestamp=trueAlways included
Several past valuesbacktracks=Nresults=N
Bulk bodyconstruct, ids optionalconstructs array, ids required
Indicators per bulk constructUp to 20No limit
Latest candleGET /candleGET /candles?results=1
Number of candlesperiod=Nresults=N
Your own candlesPOST /rsiPOST /indicator/rsi
ErrorsSeveral shapesAlways {"error": "..."} with an HTTP status

These stay the same: indicator names and their parameters such as period, backtrack, results, chart=heikinashi, the exchange names, and the timeframes 1m, 5m, 15m, 1h, 4h, 1d and 1w.

1. Get a v2 API key

v1 and v2 use separate keys. Your v1 key is rejected by v2, and the v2 key does not work on v1.

  1. Log in to app.taapi.io and open API Keys.
  2. Copy your Production key (it starts with taapi_live_sk_), or generate one if you don't have it yet. The Legacy API key (v1) on the same page is your v1 key.
  3. Both keys belong to the same account, so you can run v1 and v2 side by side while you migrate.

2. Send the key in a header

v1 took the key as a secret parameter. v2 only accepts it in the Authorization header, on every request. A secret parameter is ignored, and the request fails with 401.

v1
GET https://api.taapi.io/rsi?secret=YOUR_V1_KEY&exchange=binance&symbol=BTC/USDT&interval=1h
v2
GET https://v2.taapi.io/indicator/rsi?exchange=binance&symbol=BTCUSDT&timeframe=1h
Authorization: Bearer YOUR_API_KEY

See Authentication for examples in several languages.

3. Single indicator

Three things change in the request: the path gets an /indicator/ prefix, interval becomes timeframe, and symbols are written without a slash. Indicator parameters stay the same.

v2 request
curl -G https://v2.taapi.io/indicator/rsi \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "exchange=binance" \
  --data-urlencode "symbol=BTCUSDT" \
  --data-urlencode "timeframe=1h" \
  --data-urlencode "period=14"

In the response, every value is now an array, and a matching timestamp array is always included. With the default of one result, read value[0].

v1 response
{ "value": 54.12 }
v2 response
{ "value": [54.12], "timestamp": [1795438800] }

Indicators with several outputs keep their field names. Each field becomes an array:

v1 response — MACD
{ "valueMACD": 247.03, "valueMACDSignal": 294.58, "valueMACDHist": -47.55 }
v2 response — MACD
{
  "valueMACD":       [247.03],
  "valueMACDSignal": [294.58],
  "valueMACDHist":   [-47.55],
  "timestamp":       [1795438800]
}

As on v1, the most recent value is calculated on the candle that is still forming. The values match v1.

4. Historical values

backtrack and results work as on v1. Results are ordered oldest to newest, so the last element is the most recent.

If you used backtracks=N to get several past values, use results=N instead. v2 does not support backtracks and ignores it, so you would get a single value back. Note the order is reversed: v1 backtracks listed the newest value first, while v2 results lists it last.

v1 — backtracks=3
[
  { "value": 53.99, "backtrack": 0 },
  { "value": 56.11, "backtrack": 1 },
  { "value": 58.27, "backtrack": 2 }
]
v2 — results=3
{
  "value":     [58.27, 56.11, 53.99],
  "timestamp": [1795431600, 1795435200, 1795438800]
}

addResultTimestamp is no longer needed, because timestamps are always included. v2 also accepts results=max for all available history. See Historical values.

5. US stocks

On v1, stocks were requested with type=stocks and no exchange. On v2, stocks is an exchange like any other:

v1
GET https://api.taapi.io/rsi?secret=YOUR_V1_KEY&type=stocks&symbol=AAPL&interval=1d
v2
GET https://v2.taapi.io/indicator/rsi?exchange=stocks&symbol=AAPL&timeframe=1d
Authorization: Bearer YOUR_API_KEY

Use GET /exchanges to list every exchange and GET /exchanges/{exchange}/symbols to list its symbols. See Exchanges.

6. Bulk requests

POST /bulk keeps the same idea, one call for many indicators, with a new body and response:

  • The key moves from the secret body field to the Authorization header.
  • construct becomes a constructs array. Each construct needs an id, and interval becomes timeframe.
  • Every indicator needs an id. Ids may only contain letters, numbers and underscores, so rsi-14 becomes rsi_14. Ids must be unique, and each exchange + symbol + timeframe can appear in only one construct.
  • A construct takes as many indicators as you need. v1 allowed up to 20.
v1 body
{
  "secret": "YOUR_V1_KEY",
  "construct": {
    "exchange": "binance",
    "symbol": "BTC/USDT",
    "interval": "1h",
    "indicators": [
      { "id": "rsi_14", "indicator": "rsi", "period": 14 },
      { "id": "ema_50", "indicator": "ema", "period": 50 }
    ]
  }
}
v2 body (with Authorization header)
{
  "constructs": [
    {
      "id": "btc_1h",
      "exchange": "binance",
      "symbol": "BTCUSDT",
      "timeframe": "1h",
      "indicators": [
        { "id": "rsi_14", "indicator": "rsi", "period": 14 },
        { "id": "ema_50", "indicator": "ema", "period": 50 }
      ]
    }
  ]
}

The response is no longer a list. Results are keyed by construct id, then by indicator id, and values are arrays as in single requests:

v1 response
{
  "data": [
    { "id": "rsi_14", "indicator": "rsi", "result": { "value": 54.12 }, "errors": [] },
    { "id": "ema_50", "indicator": "ema", "result": { "value": 60730.54 }, "errors": [] }
  ]
}
v2 response
{
  "btc_1h": {
    "rsi_14": { "value": [54.12],    "timestamp": [1795438800] },
    "ema_50": { "value": [60730.54], "timestamp": [1795438800] }
  }
}

If candles can't be fetched for one construct, only that construct returns _error, with its indicators set to null. The rest of the request is unaffected. See Bulk / multiple assets.

7. Candles

v2 has one candles endpoint. Replace GET /candle with GET /candles?results=1, and the period parameter of GET /candles with results. Without results, v2 returns 500 candles.

v1
GET https://api.taapi.io/candles?secret=YOUR_V1_KEY&exchange=binance&symbol=BTC/USDT&interval=1h&period=2
v2
GET https://v2.taapi.io/candles?exchange=binance&symbol=BTCUSDT&timeframe=1h&results=2
Authorization: Bearer YOUR_API_KEY

Candles are still ordered oldest to newest and keep the same fields. timestampHuman is now formatted as 2026-11-23 13:00:00 (UTC, without the weekday), and some exchanges add a takerBuyVolume field. See Candles.

8. Indicators on your own candles

Send your candles to POST /indicator/{indicator} instead of POST /{indicator}, with the key in the header instead of the body. Candles use the same open, high, low, close and volume fields, or the shorter o, h, l, c and v. You can send up to 500 candles.

v2 request
curl -X POST https://v2.taapi.io/indicator/rsi \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "period": 3,
    "candles": [
      { "o": 50000, "h": 51000, "l": 49500, "c": 50500, "v": 100 },
      { "o": 50500, "h": 51500, "l": 50000, "c": 51000, "v": 120 },
      { "o": 51000, "h": 52000, "l": 50800, "c": 51800, "v": 95 },
      { "o": 51800, "h": 52500, "l": 51500, "c": 52000, "v": 110 },
      { "o": 52000, "h": 52200, "l": 51000, "c": 51200, "v": 130 }
    ]
  }'
v2 response
{ "value": [55.56], "timestamp": [] }

The timestamp array is filled when your candles include a timestamp (or t) field. To run several indicators over several candle series in one call, use the new POST /bulk-candles. See Manual candles.

9. Errors and retries

v1 returned errors in several shapes, such as {"error": ...}, {"message": ..., "statusCode": ...} or {"data": ...}. v2 always returns {"error": "..."} with a matching HTTP status, so you can check the status code first:

v2 error
{ "error": "Failed to fetch candles: 404 Not Found — check exchange, symbol and timeframe parameters" }

One new status to handle: if a calculation takes longer than usual, v2 answers 202 with {"pending": true}. Repeat the same request after 1–2 seconds to get the value. When you go over your rate limit, v2 returns 429 with a retryAfter value in seconds. See Errors and Rate limits.

10. Heikin Ashi candles

chart=heikinashi works as on v1: the indicator is calculated on Heikin Ashi candles instead of regular candles, and the values match v1. Leave it out, or send chart=candles, for regular candles. Any other value returns 400.

v1
GET https://api.taapi.io/rsi?secret=YOUR_V1_KEY&exchange=binance&symbol=BTC/USDT&interval=1h&chart=heikinashi
v2
GET https://v2.taapi.io/indicator/rsi?exchange=binance&symbol=BTCUSDT&timeframe=1h&chart=heikinashi
Authorization: Bearer YOUR_API_KEY

In POST /bulk, set chart on each indicator, as on v1. You can also set it on a construct, which then applies to every indicator in that construct. An indicator's own chart overrides the construct's.

v2 body — regular and Heikin Ashi RSI
{
  "constructs": [
    {
      "id": "btc_1h",
      "exchange": "binance",
      "symbol": "BTCUSDT",
      "timeframe": "1h",
      "indicators": [
        { "id": "rsi",    "indicator": "rsi" },
        { "id": "rsi_ha", "indicator": "rsi", "chart": "heikinashi" }
      ]
    }
  ]
}

To get the Heikin Ashi candles themselves, use the heikinashicandles indicator.

New in v2

  • Unlimited indicators per bulk construct, and a bulk call still counts as one request against your rate limit.
  • WebSocket streaming: indicator values pushed to you every few seconds over one connection. See WebSocket.
  • Bulk on your own candles with POST /bulk-candles.
  • All available history in one call with results=max.
  • Exchange and symbol lists with GET /exchanges and GET /exchanges/{exchange}/symbols.
  • An OpenAPI spec for generating clients. See OpenAPI / SDKs.

Migration checklist

  1. Copy your v2 Production key from app.taapi.io → API Keys.
  2. Change the base URL to https://v2.taapi.io.
  3. Remove secret and send Authorization: Bearer YOUR_API_KEY.
  4. Prefix indicator paths with /indicator/.
  5. Rename interval to timeframe.
  6. Write symbols without a slash: BTCUSDT.
  7. Replace type=stocks with exchange=stocks.
  8. Replace backtracks with results, and drop addResultTimestamp.
  9. Read values from arrays: value[0], or the last element for the most recent value.
  10. Bulk: switch to constructs, add ids with letters, numbers and underscores only, and read results by construct id and indicator id.
  11. Candles: use GET /candles with results.
  12. Handle HTTP status codes, including 202 (retry after 1–2 seconds).

Stuck on a request? Send us your v1 request and we will help you convert it.

See the full list of indicators, or start for free.