@sujith I tried that formula as well. pnl = (sellValue - buyValue) + (netQuantity * lastPrice * multiplier); but then also its the same. I used lastprice from the Positions API. Should I be using the lastPrice from websocket?
@sujith I have started coding the retry mechanism. Just want to be sure I am doing it right. Can I assume that if I fetch the order history after the order failed with this timeout error, the order will be available within the next second? or Do I n…
I am actually running 2 algos and cant really check the Order History and find out the order exists for that symbol as sometimes for the same symbol the order might be fired from both the algos
Hi @sujith , I went through that but still not clear how to handle this. Because it doesn't return the Order Id, so cant ensure that the order which I fired is actually placed or not.
Hmm. If we are running multiple algos how are we supposed to use more than 3 algos with limited websockets. If we try to store the ticks to a database and then use from multiple algos then it will unnecessarily add the delay which defeats the whole …
Hmm...why there was no communication to clients.... How can earth someone can code it without knowing what's the trading symbol format.
Can you confirm what is the format now. Is it YYMMDD for all weekly options and YYMMM for monthly options?
An easier way would be to remove 8 characters from right for future scrips... If its Option then its bit difficult as the length changes as per the strike price...
@sujith how can the client version affect the data that is sent across.... Have experienced many times the high low values doesn't match with the value from nse website. I don't understand why there is so much quality data in kite..May I know who is…
It may not be significant...but our code fails because of different structure for index and stocks....pls maintain same response structure for an API call...that's at least the basic framework any API framework uses...
This is so frustrating....and stop giving reasons of vendors....we are paying for you not for your vendor.... Isn't it your responsibility to to give us stable API.
@sujith thank you for the clarification. So basically there is no better way to get historical or for that matter current intraday data minute wise without taking the risk of storing streaming data on our side using websocket. Which leaves us with t…
And generating candles on our end using websocket data is not reliable at all..as we can miss the data because of various reasons...like API errors, network errors etc
@sujith I am not asking for later analyisis. Let's say I need to calculate 255 ema on 15 min timeframe, I would need atleast 10 days worth of data to even calculate one ema value. If we can't use historical API to get this data then I don't see an e…
@sujith if you r saying historical data API to be used only for backtesting, how do we implement strategies which requires indicators to be calculated. Any indicators will need atleast last couple of days of minute data to get accurate values...how …
@sujith I think this is an issue which is happening to many. I have experienced few times as well in the past. I seriously think you guys should investigate the cause for this.
@sujith so order excution API is 2k with which u r giving live data free of cost. And another 2k for historic data.
Is there a way I can get live data through API (as a Zerodha client) without subscribing for order execution API?
@nithin don't know why you say 2000 is not for live data but for historic data. Aren't they 2 separate subscriptions. 2k for live data+ execution of orders and 2k for historic data?
Or have you started giving both in just 2k?
Hi Sujith. It's such a waste of time to rewrite entire strategy for v3 and spend time and effort to make it stable. I understand previous version will stop working after sometime. Bit what is that duration you r looking for. Is it in weeks months or…
Awesome....how do I know the profit or loss on the current open position in real-time then? Are you saying we can't use positions API for that and instead should try to build our own mechanism to calculate based on order history and latest price?
Can you guide on how to generate 5 min candle data using websocket data....do I need to sample it every 5 mins and store them data somewhere and then use for rsi calculation
@sujith I am talking about the margin benefit of taking hedged positions.
For example: If I want to buy Nifty August Future and at the same time Sell Sept Future, the margin requirement is only 15-16k. If I am taking the positions one by one, w…
I got the new package installed by doing the below command
pip install directory where setup.py exists
now also, the socket is getting closed every second. and its reconnecting. there is really something wrong with the socket connection today.
after the installation getting this error
AttributeError: 'WebSocket' object has no attribute 'enable_reconnect'
Also, is there any issues today with socket. The socket keeps closing after few secs of connecting and now I am not even able to issue…
It's like clients are paying money as well as testing the KiteAPI for Zerodha. Why don't Zerodha does proper testing of the services and then start collecting the fee. On one hand Zerodha collecting money for API development from clients and also ge…
@vivek I tried again now and I can see the same response without depth and the mode is set as Quote.
I have one connection open with Mode as Quote and I was trying to experiment with getting the full mode with another connection. Do you think that …
@Kailash not sure if it helps but noticed that the sell qty became less after sometime.....so I think it's the total pending qty.... But if possible please confirm with proper source....
@Kailash so if it's bought and sold, shouldn't the qty be same? How will the qty different for buying and selling... Shouldn't there be a equal number of buying qty to selling qty?
@Kailash @vivek here in this documentation https://kite.trade/docs/connect/v1/#retrieving-full-instrument-list
Buy quantity and sell quantity are referred as total bought and sold quantity. Isn't it misleading.
Can you please confirm if i…