Maybe you are sending the wrong date param or is there any way that the mentioned data period request is repeated because of any conditional statement?
Maybe paste your debug log, which will give more info.
I have to go through kite.orders() , and fetch order_id of that position?
You don't have to fetch a complete order book for this. You need to place an opposite BUY or SELL order depending on whether the position is long or short.Go through this docu…
Are you sure, that you are placing same order_type order as kite web on kite connect APIs?
As the error suggests, you need to place non-market order_type i.e LIMIT, SL, etc.
No, you need to use WebSocket streaming and subscribe to a list of all instrument tokens(filter this bank nifty weekly contracts from complete instrument list).
It seems that the data for 20.04.2020 is repeated twice.
Just checked the day candle for 20.04.2020 and a day before and after to it for both contracts. All seems fine:
For ACC(token-5633):
2020-04-17 ,1169,1193.25,1136.2,1172.8,1614409
2020-04-20 ,…
past 5 years crdue oil 1 minute handle data from historical subscription
You can only fetch only day candle historical data for older than 3 months(i.e current running contracts). Go through this documentation to know more.
error parsing tokens.
As the error says, you are passing the wrong instrument token. You need to fetch the correct access token from the complete instrument list.
"https://127.0.0.1:5000/postback"
Is this end-point up and running at the instance of registering it as postback URL?
If not, make sure it's up and running.
subscription_list = [strike_instrument_token_CE,strike_instrument_token_PE]
I am not using pandas datatype
You are using NumPy datatype (numpy.int64) item inside subscription list. It should be int data type instead. You need to typecast these numpy…
We are checking on this. But, will this release will take some time, as we will be releasing this as a major breaking- release along with a few up-gradation already in the queue.
For now, you can fork our pykiteconnect repo, create a new branch whi…
I just included jquery version:3.3.1 and checked for jquery .click handler.
It's working perfectly fine. Depending on your flow requirement, you can include jquery or publisher.js before or after each other.
For example, i just tested for this …
Is it possible to order through instrument token in place of trading symbol.
No, you have to use the trading symbol for order placement. Know about all order placement params here.
https://api.kite.trade/session/token?api_key=$api_key&request_token=$request_token&checksum=$checksum
It should be FORM POST request, make sure you are doing the same. You can more on this documentation.
OSError: [WinError 10050] A socket operation encountered a dead network
It means, the issue with your server network system. This article, explains on the issue.
For example : Kirloskar Brothers Limited (KIRLOSBROS) belongs to series "BE"
You will have to add BE suffix to the symbol. This will be correct symbol: KIRLOSBROS-BE
how to close connection from my end? (call on_close, if i want to close connection after my strategy completed).
Yes, you need to gracefully exit WebSocket using ws.close() based on your condition. Something like:
def close_websocket(self):
self…
We just checked and LTP is showing fine in Publisher.
Can you re-check and let us know if it is still showing zero? and some more debug info on this, so we can reproduce the above issue at our end.
What I am trying to trap is the Execution status, ie, OPEN, COMPLETE, CANCELLED, or REJECTED after order placement is SUCCESS.
You will have to get these order statuses from the orderbook.
You can go through the API response structure here. A successful response structure will return the status key with the value success.
You can go through the order placement response structure here.
Connection error: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake
Your above code looks fine. Can you paste the complete error traceback? Disconnection reason should be highlighted…
Do i need to change the redirect URL in sample ?
yes, you need to change redirect URL from current kite.zerodha.com to other.
If so, May i know the reason?
This is because of the mixing of the kite connect auth session and kite web(kite.zerodha.com)…
def on_ticks(ws, ticks):
print("on_ticks")
print("Ticks: {}".format(ticks))
ws.close()
You shouldn't call ws.close() method inside on_ticks, as this closes the active websocket connection.
You can check the Websocket example code here.
Is login throwing any error?
Are you using the same user id to login as mentioned in the kite connect app developer account for the app?
You can go through the documentation here.
Is Postback-Url safer than WebSocket?
Both are triggered at the same event. So, using either doesn't make a difference. In the case of postback URL, you need to have configured a proper HTTPS setup.
new Date("2021-07-08 10:50:00") new Date("2021-07-08 11:00:00")
new Date constructor converts Date objects without time zone info to UTC time zone by default.
So, this new Date("2021-07-08 10:50:00") represent as 2021-07-08T05:20:00.000Z i.e 05:20 …
Do we get trade id for each trade on postback / WebSocket update?
Yes, you will get order_id/exchange_order_id for each postback update. You can check the sample payload here.
PS: We request you to go through kite connect documentation in detail, b…
Are you following the steps mentioned here for access token generation?
You can refer access token generation steps here for python client. This thread gives more detail on the above issue.
Do we need kite Historical api subscription for access to …
why am I getting two cancel responses for each cancel request ?
Are you getting this in the order-book or postback update? You haven't mentioned the API source.
If this is for postback, then it will be asynchronous events as @sujith said.
Why am i g…
I just skimmed through your code, it looks fine. It should be fine if you are calling the listener() method properly. Are you able to see, such placed orders on the kite web order book? Are those orders successfully placed?
Yes, it's showing fine. We just checked below request:
kc.getHistoricalData(408065, 'minute', '2021-05-27 09:00:00', '2021-05-28 09:30:00', false)
PS: In node js, Date objects by default are always zero UTC offset i.e in the UTC time zone. You can g…
You need the previous day's end-of-the-day OI to calculate the net percentage change.
This is required if you are looking to calculate the day's OI change.
if i have to calculate Change in OI for every 5 min so what should i do
If you are looking fo…
We have informed the team to take a look at this. For now, as an interim fix, you can fetch and store data the same day any time after 03:30 PM at your end.
For individual developers, Postbacks over WebSocket is recommended, where, orders placed for a particular user anywhere, for instance, web, mobile, or desktop platforms, are sent.
As mentioned in document , With the implementation of Ticker only i c…
can I add multiple API apps with different client ids?
Do you mean to create multiple apps in a single developer account with different login Zerodha id's?
If yes, then you can do this. Just make sure to add the required client id in Zerodha Client …
3 websockets can fetch nearly 900 instrument
You can subscribe for up to 3000 instruments on a single WebSocket connection. So, you can fetch 9000 connections in total for 3 WebSocket connections.
I read in some discussion here that the api provides intaraday data (1min, 5min interval) for the last 3 years but i also read that nifty and bank nifty intraday data is available for the last 6 years since 2015
Yes, Nifty 50 and Bank Nifty index da…
This is not an issue. In node js, Date objects by default are always zero UTC offset i.e in the UTC time zone. If you want time string in your local time zone, you can convert using toLocaleString(), by keeping your local system to be in IST.
we are observing live data/inputs (ex., LTP, High, Low) not matching with exchange data in API's
Are you trying to compare kite connect WebSocket streaming data with Nse website data?
If yes, then the Nse website shows delayed data feed.
Is this documented somewhere? What are the limits on the other time frames?
Yes, you can go through this thread. You can visit here for all historical data FAQs.
Is there a way to fetch the ticks data in 5 or 10 seconds interval ?
No, there is no out-of-the-box feature for this time-based stream for WebSocket streaming at present.
Either you built this at your end for Websocket streaming or use Quote APIs c…
No, you can't use the publisher to modify or cancel the order. Modify or cancel orders require order_id as input param and you can use only these sets of input params for the publisher.
You will need the kite connect app for this.
kite.positions () API JSON response has only 'exchange' info. Any reason why 'segment' or 'instrument_type' are excluded in this API response?
And similarly, kite.orders() also has 'segment' / 'instrument_type' missing in its response, only has 'exc…
@sauravkedia
This ReadTimeOutError is becoming a difficult issue to manage. It is happening daily for first 10 minutes in market
We tried to inspect this for the last 2 days at the market start(09:15-09:25 AM) by placing a couple of EQ Market order…
Can you tell exact time to replace such orders or at least average time ?
There is no fixed time period delay as such. You just need to make sure that, by whatever time delay you re-place such orders, it is not exceeding the rate limit.
PS: You are…
How to get to know the circuit limit range, when the orders get cancelled
You can use Quote APIs to fetch circuit limit range for the required instrument.
Sometimes the cancelled orders are stoploss limit / Market orders and would like to place the…
When I try to place an order using the JavaScript client, I get the above error mentioned in the title. Then the websocket disconnects and reconnects.
It's not recommended to block the kite ticker main thread, by performing any computation/API calls…
Can you upgrade to latest twisted package by pip install twisted --upgrade and then pip install --upgrade kiteconnect and check once, if this reoccurs?
As, said above the WebSocket ticker is working absolutely fine, and historical data based on these are showing the same. We can't assist with your code as it is outside the scope of KiteConnect.
Today(25th June), I had subscribed BANKNIFTY2170135100…
How to handle symbol subscription for these three websockets independently?
These three WebSocket connections are independent of each other when initiated using different interpreter processes i.e run independently of each other in the same or diff…
What is minimum time span to place same order to not get rejected ?
Didn't get what you mean by time span here?
As, per the above rejection reason, you are trying to place order outside of the circuit limit range.
So, in order to avoid your orders …
code: ECONNABORTED","error_type":"NetworkException"
This time-out is from your local machine/network, you need to check on your local network connection.
9:17:58 is the time when latest tick arrived after 2 minute, 40 seconds. Can you please check the previous 1 minute candles?
We have checked all minute candles from 09:15 - 09:20. All are showing fine.
Date, open, High, Low, close, volume
2021-06-21…
I had subscribed Option symbols: BANKNIFTY21JUN34000CE and BANKNIFTY21JUN34000PE along with other 15-20 symbols. I didn't receive at the money option tick data for couple of minutes.
We just checked chart historical data, which too uses the same We…
I have to provide instrument_token. My doubt is where do I find those?
You can find instrument_token and other detail for the required contract from the full instrument list.