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.
At a glance
| v1 | v2 | |
|---|---|---|
| Base URL | https://api.taapi.io | https://v2.taapi.io |
| API key | Legacy API key (v1) | Production key, starts with taapi_live_sk_ |
| Authentication | secret in the query string or body | Authorization: Bearer YOUR_API_KEY header |
| Indicator URL | GET /rsi | GET /indicator/rsi |
| Timeframe parameter | interval | timeframe |
| Symbol format | BTC/USDT | BTCUSDT (no slash) |
| US stocks | type=stocks | exchange=stocks |
| Response values | Plain numbers: {"value": 54.1} | Arrays with timestamps: {"value": [54.1], "timestamp": [1795438800]} |
| Result timestamp | addResultTimestamp=true | Always included |
| Several past values | backtracks=N | results=N |
| Bulk body | construct, ids optional | constructs array, ids required |
| Indicators per bulk construct | Up to 20 | No limit |
| Latest candle | GET /candle | GET /candles?results=1 |
| Number of candles | period=N | results=N |
| Your own candles | POST /rsi | POST /indicator/rsi |
| Errors | Several shapes | Always {"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.
- Log in to app.taapi.io and open API Keys.
- 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. - 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.
GET https://api.taapi.io/rsi?secret=YOUR_V1_KEY&exchange=binance&symbol=BTC/USDT&interval=1h
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.
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].
{ "value": 54.12 }{ "value": [54.12], "timestamp": [1795438800] }Indicators with several outputs keep their field names. Each field becomes an array:
{ "valueMACD": 247.03, "valueMACDSignal": 294.58, "valueMACDHist": -47.55 }{
"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.
[
{ "value": 53.99, "backtrack": 0 },
{ "value": 56.11, "backtrack": 1 },
{ "value": 58.27, "backtrack": 2 }
]{
"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:
GET https://api.taapi.io/rsi?secret=YOUR_V1_KEY&type=stocks&symbol=AAPL&interval=1d
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
secretbody field to theAuthorizationheader. constructbecomes aconstructsarray. Each construct needs anid, andintervalbecomestimeframe.- Every indicator needs an
id. Ids may only contain letters, numbers and underscores, sorsi-14becomesrsi_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.
{
"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 }
]
}
}{
"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:
{
"data": [
{ "id": "rsi_14", "indicator": "rsi", "result": { "value": 54.12 }, "errors": [] },
{ "id": "ema_50", "indicator": "ema", "result": { "value": 60730.54 }, "errors": [] }
]
}{
"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.
GET https://api.taapi.io/candles?secret=YOUR_V1_KEY&exchange=binance&symbol=BTC/USDT&interval=1h&period=2
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.
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 }
]
}'{ "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:
{ "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.
GET https://api.taapi.io/rsi?secret=YOUR_V1_KEY&exchange=binance&symbol=BTC/USDT&interval=1h&chart=heikinashi
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.
{
"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 /exchangesandGET /exchanges/{exchange}/symbols. - An OpenAPI spec for generating clients. See OpenAPI / SDKs.
Migration checklist
- Copy your v2 Production key from app.taapi.io → API Keys.
- Change the base URL to
https://v2.taapi.io. - Remove
secretand sendAuthorization: Bearer YOUR_API_KEY. - Prefix indicator paths with
/indicator/. - Rename
intervaltotimeframe. - Write symbols without a slash:
BTCUSDT. - Replace
type=stockswithexchange=stocks. - Replace
backtrackswithresults, and dropaddResultTimestamp. - Read values from arrays:
value[0], or the last element for the most recent value. - Bulk: switch to
constructs, add ids with letters, numbers and underscores only, and read results by construct id and indicator id. - Candles: use
GET /candleswithresults. - 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.