How to get historical data to a data.csv ?