Skip to main content
All CollectionsAPI and Indicators
Return Indicator Values Between Specific Date Range
Return Indicator Values Between Specific Date Range

How to get price and indicator values for a specific date and time in history

Updated yesterday

Our API simplifies the process of requesting historical indicator values within a specified date and time range, using the fromTimestamp and toTimestamp parameters. The fromTimestamp sets the start of your desired range, while the toTimestamp defines the end. TAAPI.IO will return all indicator values within the selected timeframe (e.g., weekly, daily, hourly, minute) that fall within this range. This functionality makes querying historical data both easy and powerful.

Here are a few examples of how to use fromTimestamp and toTimestamp efficiently:

Give my all daily RSI values for AAPL from May 1 to May 31, 2023:

https://api.taapi.io/rsi?secret=APIKEY&symbol=AAPL&interval=1d&type=stocks&fromTimestamp=1682899200&toTimestamp=1685577600

Or here's a crypto example:

Give me day by day RSI values from January 1 2022 until today:

https://api.taapi.io/rsi?secret=APIKEY&symbol=BTC%2FUSDT&interval=1d&exchange=binance&addResultTimestamp=true&fromTimestamp=1640995200

Notice that you use the following parameters to define the range you are looking for:

fromTimestamp=1682899200
toTimestamp=1685577600
  • fromTimestamp: The start of the time range in Unix epoch time.

  • toTimestamp: The end of the time range in Unix epoch time.

And you'll get back a list of the relevant values, together with their respective timestamp (so you can easily identify which value belongs to which date/time). Like this:

Limitations

Users on the Basic plan can only query results up to 50 candles back. Pro users can query up to 300 candles back, while Expert users have the capability to go up to 2000 candles back on every timeframe. For example, on the daily timeframe for stocks, this means Expert users can access data going back up to 10 years in history.

Please note: if your active subscription plan does not allow you to get results as far back in the history as you are querying, you will receive an empty response.

Did this answer your question?