History API returning data in reverse order

Here is the url formed for DOTUSD
[https://api.india.delta.exchange/v2/history/candles?symbol=DOTUSD&start=1742083200&end=1742803200&resolution=1h] (API URL)

This returns the data in reverse order , i mean the first object in the array is the latest one and last object in the array is the first one.
Just open the link in the browser and check the response.

Welcome to the community Dilip !

API is designed to return the candle data starting with the most recent candle (i.e., the newest entry is first in the array). If you prefer to process the data chronologically from oldest to newest, you can simply reverse the array or sort the entries by their timestamps in ascending order.

Please let me know if you have any other questions or need further assistance!

1 Like

Thanks for the quick response.