Zerodha Team,
This ReadTimeOutError is becoming a difficult issue to manage. It is happening daily for first 10 minutes in market and there is no way to manage it as you send an order update as late as 2 minute after placing the initial order. It i…
@sujith
Any updates? I want this one badly. In absence of this api call, It is difficult to get accurate picture of what trades happened during the day. This api was broken yesterday as well.
I have tried extracting that information through chan…
Infact when I hit it directly on your api end point using curl , then also I receive a blank list.
curl "https://api.kite.trade/trades" \
-H "X-Kite-Version: 3" \
-H "Authorization: token apikey:accesstoken"
{"status":"success","da…
@ymograi Thanks. In my opinion it won't matter where the access_token is generated as the login process and subsequent requests all hit the same 'kite.trade' url. On easy solution is that I change the ip of my machine and hope that it doesn't face…
Unfortunately, this is not your in-house system catering to your in-house requirements, but a commercial system you have rolled out to end-users. Who owns the responsibility for us missing out on our trading today just because your developer was car…
@sujith can you check if any changes have been made at your end in terms of data structure, fields, packet size etc. That could be the culprit as I am not using official example (which is working fine). I am using my own custom method to parse binar…
@archulysses
a. You may try to enter into multiple positions on a single day in hope that a few of them will turn out good with others getting stopped out, making the strategy overall profitable. You may long and short equal amounts, say go long T…
@archulysses, I am not able to understand your question or rather the thought process behind this question. If you were to elaborate on what you are thinking, probably I can try and help you better.
In a nutshell, short term trading is all about le…
@trade_then ,
Extracting the upper and lower band limit values is not a tough task at all, and infact I do it for one of the Algos using the excellent "nsepy" python library. One should check it out, it scrapes a lot of information out of nse websi…
The picture is murkier than this. My PNB order got capped at around 5% percent whereas SBI order got away with around 10%. So, neither of this 5% or 10% number is explaining what I have observed.
This needs more clarity from Zerodha.
Thankyou MAG,
I have worked with this algo before and it works well. This algo is an obvious first choice: keep collecting ticks in form of dict, and when candles are required , convert to pandas and then use excellent pandas resampling to get cand…
@MAG Thanks for the time take to explain this. Your algo seems interesting enough, however I am not able to grasp it completely especially what exactly script two is doing when script one is already writing data into db. What is the concept of "Stoc…
@Sujith,
There is something we are missing here. Today I placed a bracket order to Short SBI March futures. It got filled at 253.20.Now, in line with our discussion and as happened in the PNB case cited above, if my Limit leg on BO was below 253.…
Thanks @RP3436.
I am trying to get a sense of what you are trying to do. However, the devil in details and I am not able to grasp a complete picture. To answer in general:
a. Simple is better then complex. A simpler algorithm is better than a comp…
In a nutshell, are you saying that both the SL and Limit leg of Bracket orders for Futures has to be placed within 5% of the price trading at the time of placing the order?
This is not making sense. Can you send me detailed rules and limitations around Bracket Orders. PNB opened at 107 range and lower circuit value was 101.4 implying 5% barrier which is rubbish. More likely it was lower circuit for previous day. If so,…
MAG,
Great Post. This is definitely one of the biggest problems the community is currently facing.
I understand that you are getting ticks in dicts and relying on pandas to form candles and subsequent calculations/analysis. Howevever I have faced i…
I would second it.
But I would add, we would need two features: one at LTP and other at mid of Bid+ask. Considering the infrastructure bottlenecks, there is time delay between the bid/ask appearing in market to you capturing that, sending it us t…
Thank you Vivek,
The problems have been fixed for now. In case there is any change in rate limits etc ,please announce well in advance and allow users to adjust/migrate.
Regards
Saurav
Thanks Vivek,
I would still say that from a user's perspective, your catching of errors in Autobahn is poor. Unfortunately it means we are having to delve into actual Autobahn codes.
The user shouldn't receive Autobahn error at all. Erorrs like …
Hi Vivek,
1. Looks alright.
2. Your team need to sort that max length setting. It is configurable. Further, can you advise how to subscribe in batches? Please share sample code. Why advertise a functionality which is not usable.
3. I thought we ar…
Hi,
I had posted another post with detailed example with steps to reproduce, however it is waiting to be approved by admin(your team). Can you have a look at that and close this.
Regards
Saurav
Thats the fun part, when I try a single thread with 600 odd tickers, I get the error mentioned by you above. And when I try to run multiple threads, I get 429 error. As long as I am happy with 500 tickers in one thread, things are okay.
Hi __name__,
This problem can be handled. In zerodha's kiteconnect.ticker module, there is connect mothod in class KiteTicker. At the end, there are the following lines:
opts = {}
if threaded:
# Signals are not allowed …
I have done it and it works.
1. You take two API subscriptions, one each for both client ids.
2. You create two apps in one developer account, one each for the two client ids.
3. You log in to one client id in one browser say Chorme and get requ…
Guys,
Unfortunately, today, this error was being generated not only for new entries but also for modifying/exiting existing trades.
Further, the error code is such that its a part of general errors and you cant loop it back. On a priority basis,…
@sujith Today as well I placed multiple Bracket orders for DLF17NOVFUT, a few got traded. However for two trades at 9:37:04 am and 9:36:04 am at I got the same error, Trading Symbol doesn't exist. I was not able to collect the params, but from my tr…
This is not intermittent, it keeps coming again and again. Look at issue I raised a while back: https://kite.trade/forum/discussion/2387/trading-symbol-doesnt-exist-for-the-exchange-error-error-code-400#latest
Further, day before yesterday yesterda…
@sidverm great job. It sorts out a lot of gray areas for all of us.
@nitin, Many of us operate in intraday markets and for us speed of execution is important. From what it appears, currently even the users who are hosted on cloud, despite having a…
Caveat: The signal generation part of my lives strategies is simple, doesn't watch market continuously, exits are via SL - TP- End of Day and I seek additional price confirmation before firing the entry order to broker, so latency at the time of sig…
@ravender, I do fire TWAP orders both on entry and exit sides (with focus on scalability wherein I want to build position over time), however I have written a complete orderbook module for this, which I have then incorporated in overall quantstart a…
@Kailash, For an user who want to use tick data streamed over websockets over quotes API, I have two requirements:
a. Backfill: In websockets, we miss data because of network issues, system crash etc. Right now, these are permanent black holes in…
@Kailash Are you pushing new updates to libraries as well to benefit from these. If yes, please make them connect to new 3.0 backend.
If no, then you would appreciate you have lost credibility around timelines. As you keep bemoaning, a lot may be…
Hi @sujith
1. The official urls as mentioned in your official documentation on kite.trade.
When I tried to add header to official library. I get the InvalidHeader Error.
So, I tried browser. I used developer mode in Firefox and go to network tab…
@Vivek
I am missing a lot of trades as well as getting lots of errors on your platform lately. It is damn irritating, not to mention the costs involved. If connection to the 3.0 back-end will solve some of the problems, I suggest you share how to u…
Hold on Guys, I had this problem today as well as on TATAMOTORS17NOVFUT and DLF17NOVFUT. With the same code, I can place a many orders in same tickers but one order each in these two symbols got rejected with this error code.
@ramatius thats what I am doing right now. However, it is not fool proof. Ideally positions across strategies should add up to Zerodha's positions but many things can go wrong example a corporate action. It would have been better had Zerodha given …
1. You are right, a vector/array driven backtest (like those in Amibroker etc) make too many assumption on execution which are difficult to find in live conditions. There is time lost in calcualtions. They fill on desired price (say closing price or…
1. Execution: Serious programmer/traders who want to look at a cutting edge execution system should look at qstrader at quantstart.com. Its written in Python. Since, its a demo project, it is simple and can be easily modified to suit ones requiremen…
@sidverm, I would want to know more details on '10ms'. So are you able to convert your tickdata into pandas dataframe in 10ms time? Or now in loops without pandas, you are achieving 10ms.
I have experimented with these and here are my observations:…
I haven't experienced it since then, so lets drop it for a while. But Kite, in general, throws unbelievably large number of errors. I thought it was because of execution/connectivity issues at my end before I spoke to others.
I got a very sensible view on it yesterday. If algo trading something which your are doing along with regular work/job, then even if there a problem later, it maynot hit you badly. But if it is primary profession, best to get it approvals in place. …
@revendar , I work reverse. The strategies are aware of the positions they are carrying (by tracking tracking tags at fills at Zerodha ). Thats it. I don't really breakdown positions/holdings as seen on zerodha and match them with the my system deri…
@sujit, I have the same question.
I am running multiple positional strategies and I want to know which position (or holding) is coming from which strategy. Plus I trade manually as well. So, right now its bit of a headache.
@razcards, the bid and ask data come in form for a list which is sorted with top item being the best. I also extract this two row to get best bid and offer and use it for trading
The real issues comes later.
Right now, we receive data in json for…
@abhash2610 you can safely assume ticksize to 0.05 for all tickers for equity cash and derivatives. Only for a few tickers, it is different and you are unlikely to trade those.
Kite doesn't provide any facility to place the order automatically when market opens or to identify that market has opened.
So you will have to
1. Monitor market open by checking time-stamp of ticks received from websocket. Assume, you started y…
@rajtk try and check if you are using the same access_token in all processes. Kite being HTTP based, it shouldnt really matter if you got your api key and access token right. So, ideally you should obtain your access_token once and use it all proces…
@ones Out of sheer laziness, I had not implemented postbacks. I am polling kite.trades() every 15 seconds to get order fill information and working with it. Key is that you need to do it in a separate thread. If the current postback feature is a h…
@MohitGowda Try something simpler. On the main thread, spawn a new permanent thread say DBThread and set up a mutithreading queue between main thread and DBThread. MainThread will receive tick and push it into Queue and do whatever you want to do w…
In these two line, just remove the brackets after function name and report if it works or not.
So, in
t1 = threading.Thread(target=kws.connect()) #Thread 1
t2 = threading.Thread(target=timer()) #Thread 2
make it:
t1 = threading.Thread(target=kws.co…
@Shaha It will depend upon what scrips you are trading , your trade size, and your frequency of trading, and your holding period. The more illiquid scrips you trade (say you start moving from Nfity 50, to nifty 100 and then to 200 and then to 500), …
@haribabu , there are two issues here. Our discussion here is limited to first issue: slippage i.e the difference between the price at which you placed for entry/exit order vis-à-vis the price you get filled in. If the average slippage is high, i…
Some recent example on slippage: Rather than placing Market Orders, to enter at Market I place Limit order at prevailing mid price (price from Zerodha Websocket) to save on slippage. Using this method, yesterday at around 925-930, Out of 5 lots whic…
on the historical data API, I was once having a broker's terminal running on his LAN, and I was viewing through remote desktop. I could clearly see that on Nifty futures, the websocket was permanently trailing behind, however the latency wouldn't be…
On the latency front, I have been routinely placing orders within latency of 1.5 seconds. I haven't measured the delay in subsequent fill though as I keep polling API every 15 seconds to find new fills, rather using using postback. That said, I face…
You may try: http://www.equityonsms.com/p/get-free-end-of-day-data-of-nse-equity.html They have Intraday 1 min candles from 2010. However, it is raw google data, not adjusted for either spikes and errors or splits and bonuses.
Great post @sudhirshettyk . I would also like to add to give additional insights on the issue. Zerodha would claim, rightly so, that for real-time trading needs, websockets is the way to go. However practically, it not very easy for retail traders …
@sudhirshettyk. I am facing the same issue where I need corporate actions adjusted data on a daily basis. (I also don't want to adjust for actions myself). For this currently, I am exploring another paid subscription http://www.viratechsoftware.com/…
Yes , I faced the same issue.
More than trades getting rejected, the issue is that on a daily basis, I download this file and use it to get instrument_tokens for all desired symbols for websocket data streaming. Because of the issue, I was not ab…
I have been lately seeing a peculiar issue in Websocket. For last two days, using python client, I am noticing that the websocket are significantly delayed as compared to actual price. After a while say around 9.30 or so, the delay in websocket is …
Hi,
I am getting the same issue today. Using a python client on Python 3.4, when if call for kite.orders():
I get DataException as below. Apparently, there is an issue with encoding of the json which is coming from your end. However, when I place …
Again, I am getting these errors. Once I start getting this error, all commands will give this error for a while.
Funny thing is that websocket is streaming data uninterrupted all this while. So, my internet connectivity as a problem is ruled out.…
I got this one for atleast 20 minutes today:
File "D:\Filehistory Backup D\WinPython-64bit-3.5.2.2\python-3.5.2.amd64\lib\site-packages\kiteconnect\__init__.py", line 236, in request_access_token
"checksum": checksum
File "D:\Filehistory Ba…
The issue in implementing this is that many of us fire orders in the morning and then switch off system and go to work. Now, if we have to keep system live till 3.15 or maybe login again at 3.15 or so, it will be too much extra work for us. Charging…
So, hypothetically, if you placed say 30 orders under one second, then I assume first 15 will go through. What will happen to last 30? Will they be rejected or the thread will get locked till 1 second is passed and then remaining will go through. If…
@arnavsaxena Are you able to use this data in your trading practically considering the data holes. In my understanding, these data holes are bound to come. At minimum, they are a big risk for intraday trading. While one can face data blackouts in an…
@sujith if we are using websockets to get data and using that to run trading systems, then connection drops could lead to data holes. Does your websocket detect these dataholes and fill them. If not, then there is a big risk a connection error at yo…