☰
Login
Signup
Home
›
Market data (WebSockets)
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.9K
All Categories
0
Incidents
156
Node JS client
40
Go client
793
.Net API client
380
Kite Publisher
537
.Net / VBA / Excel (3rd party)
458
Algorithms and Strategies
998
Java client
1.1K
API clients
404
PHP client
4K
Python client
348
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
August 2018
Sashank_Chittipeddi
July 2018
rakeshr
Delay in fetching Open data - previous close returned
Sashank_Chittipeddi
July 2018
edited July 2018
in
Market data (WebSockets)
Hello,
I used the following code to get the open data and then do calculations on it.
r=requests.get('
https://api.kite.trade/quote/ohlc?api_key=xxx8&access_token=xxx&i=NSE:ASIANPAINT'
)
data=r.json()
data=pd.DataFrame(data['data'])
#extract
the opening price like below -
data['NSE:ASIANPAINT']['ohlc']['open']
ran the code immediately after market open - at 0915 a.m
However, during my review today, discovered that the above formula returned the close data as against open.
I want to know if I can run the above code at 0915. If not, what is the appropriate time to run it? a few seconds delay?
Thanks!
Tagged:
#python #ticker #marketdata
rakeshr
July 2018
@Sashank_Chittipeddi
No, ohlc API should return open price of the day after market open.It can happen that both open and yesterday close price, can be same.Does this happened for multiple scrip?
Sashank_Chittipeddi
July 2018
@rakeshr
Yes happened for all the scrips I ran the code for. And open price were not the same as close
rakeshr
July 2018
@Sashank_Chittipeddi
Let us check, the same at our end.
Sashank_Chittipeddi
August 2018
@rakeshr
The code is working now. at 09:08, after the pre market , populate the open data and its working fine
Sign In
or
Register
to comment.
No, ohlc API should return open price of the day after market open.It can happen that both open and yesterday close price, can be same.Does this happened for multiple scrip?
Yes happened for all the scrips I ran the code for. And open price were not the same as close
Let us check, the same at our end.
The code is working now. at 09:08, after the pre market , populate the open data and its working fine