Skip to main content

Accessing historical data easily with the Results parameter

Results parameter is the most efficient and easy way to access historical data in one efficient API call

Add the optional parameter results=X to your query to get historical indicator values, up to and including the most recent candle, in a single API request.

How it works

"X" is the number of candles you want values for. For example, results=10 returns the indicator values for the last 10 candles. Use results=max to get values for all available historical candles.

Example: the daily RSI of BTCUSDT for the past 10 days

curl "https://v2.taapi.io/indicator/rsi?exchange=binance&symbol=BTCUSDT&timeframe=1d&results=10" \
-H "Authorization: Bearer YOUR_API_KEY"

How the results are returned

Values are returned oldest first, and every value comes with the timestamp of its candle at the same position in the timestamp array:

{
"value": [48.12, 45.80, ..., 31.10],
"timestamp": [1792886400, 1792972800, ..., 1793664000]
}

In v2 you no longer need the addResultTimestamp parameter: timestamps are always included.

Combining with backtrack

Use backtrack=X to skip the X most recent candles. For example, results=10&backtrack=5 returns 10 values ending 5 candles ago.

Limitations

How many results you can request in one call depends on your subscription plan. Check the plans page for the limits of each plan.

Did this answer your question?