0

I use client.get_historical_klines(pair_to_trade, Client.KLINE_INTERVAL_1DAY, date_0, date_1) to get candlesticks data from Binance API starting from date_0 to date_1. According to this site, the first and the 7th data in the list, refers to open time and close time. For example i get for 30 Aug, 2021 the following: open time: 1630281600000, and close time: 1630285199999 (on a one day interval).

My question is, what are those numbers. Is there a way to convert them to get an actual date&time that is readable? (i.e. (2021,8,30,0,0) for 30 Aug, 2021, 00:00)

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • Sorry for all the updates. Found [the correct post](https://stackoverflow.com/questions/12400256/converting-epoch-time-into-the-datetime) – OneCricketeer Sep 07 '21 at 19:54

1 Answers1

1

Those are unix timestamps, you can find how to deal with the timestamp on this question

Sebastián Espinosa
  • 2,123
  • 13
  • 23