☰
Login
Signup
Home
›
General
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.8K
All Categories
0
Incidents
154
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
993
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
December 2017
rajtk
December 2017
sujith
historical data timestamp error
rajtk
December 2017
edited December 2017
in
General
I wanted to fetch 5 mins 2 months old data. Not sure why it has to start with 3:45 pm onwards. Can't we get this historical data as we get from pi and save it to excel.
Please make it easier.
report = kite.historical(instrument_token=token,from_date="2017-10-30", to_date= "2017-11-30",interval= "5minute")
df = pd.DataFrame(report)
df['date'] = pd.to_datetime(df['date'])
#pd
.to_datetime(df['date'], format = '%Y-%m-%d:%H:%M:%S')#
df['T_time'] = pd.to_datetime(df['date']).dt.time
data = df.set_index(['date'])
print data.head(10)
EXIDEIND
close high low open volume T_time
date
2017-10-30 03:45:00 204.65 204.95 203.70 203.90 3193 03:45:00
2017-10-30 03:50:00 204.50 204.90 204.25 204.65 3480 03:50:00
2017-10-30 03:55:00 205.30 205.45 204.50 204.50 1118 03:55:00
2017-10-30 04:00:00 205.05 205.30 204.70 205.30 1161 04:00:00
2017-10-30 04:05:00 205.20 205.30 205.05 205.05 3068 04:05:00
2017-10-30 04:10:00 204.80 205.50 204.80 205.20 2253 04:10:00
2017-10-30 04:15:00 204.90 205.10 204.60 204.80 3439 04:15:00
2017-10-30 04:20:00 204.75 205.00 204.75 204.90 3974 04:20:00
2017-10-30 04:25:00 204.70 205.00 204.65 204.75 1448 04:25:00
2017-10-30 04:30:00 205.00 205.00 204.70 204.70 152 04:30:00
Tagged:
historical API
sujith
December 2017
Hi,
Can you give us instrument token for which you are getting data from 15:45?
rajtk
December 2017
the above one is for PNB. I guess am are getting this for all the scripts. I ran this yesterday around 7:00 pm
sujith
December 2017
Hi,
We follow 24-hour format. I just checked for PNB on 30/10/2017, it seems fine.
rajtk
December 2017
I will try doing this (datetime.datetime.strptime("2015-12-28T09:15:00+0530", "%Y-%m-%dT%H:%M:%S+0530") ,
maybe it will help.
rajtk
December 2017
Please close this ticket
This discussion has been closed.
Can you give us instrument token for which you are getting data from 15:45?
We follow 24-hour format. I just checked for PNB on 30/10/2017, it seems fine.
maybe it will help.