@manish_sharma
I am confused how do you calculate the average stock price?
Are you looking for Buy average price of holdings?
If yes, this article explains the calculation for the same.
@omtechnologies
So all in all, how can we place basket order in securities with same or different underlying.
Currently, you need to handle basket order formation/execution at your end. We currently, don't have this specific API endpoint(except pub…
@akashchopda555
Recently VIVIDHA is migrated to the BE category, so the difference. You can understand more about BE category in this article.
no entry for bse ideally it should be there?
It's there in the latest instrument list.
129573380,506146…
@akashchopda555
I am not getting net_change parameter from quotes API for any script
You need to calculate this at your end. You can go through this thread.
I am not getting correct values for last_price and ohlc.close for Commodity.
It's working f…
@varuntoshniwal97
If data is received a bit later in the minute, should open value be the previous candle's close
For WebSocket streaming, we broadcast the same data as we receive in real-time from the respective exchange. So, there won't be any kn…
@ajayhemanth
You would be requesting the wrong to and fro interval w.r.t kite web candle or for difference exchange(NSE, BSE). You can go through this thread to understand this.
So, is there any limit TO THE API where it returns 1MINUTE HISTORICAL DATA FOR 4 TRADING DAYS IN ONE REQUEST???
Yes, we have a limit for all candle periods. You can check each candle limitation for a single request in this thread.
@ravishastry
There was an issue regarding this position conversion param, which has been fixed. You need to update your Python Kiteconnect package and check the same. Update using pip install --upgrade kiteconnect .
Also, you seem to using the wron…
We see that timestamp is of 2021,1,13,8,31,40. You mean to say, is this timestamp showing wrong w.r.t real timestamp?
If yes, then you need to check your local system time and Zone and make sure it's correct.
@Mangesh
You seem to be using the wrong trading symbol. Are you looking for a Weekly Banknifty contract(14th Jan expiry)?
If yes, then this BANKNIFTY2111432600PE would be correct trading symbol. You can go through this thread to understand format …
@nkmrao
What I want to know is how to handle this error and restart the websocket automatically when it occurs
You can just remove the def on_close(ws, code, reason) method callback i.e . kite_ws.on_close = on_close. It will auto re-connect.
If I subscribe for ticks of different option strike prices of Nifty and Bank Nifty options, will I get the running open interest also?
Yes, you need to subscribe to FULL Mode. You can check the complete packet structure for full mode here.
@mayurajain
Sometimes I observed that kite platform forms candles from 1st sec to 0th sec as one min candle.
No, we form it from XX:0 to XX:59 second for all respective candles.
You can try looking out for computation/storage delay at your end.
@moksh
wanted to confirm about derivatives market, can we trade in derivatives market with API ?
Yes, if you have respective derivates exchange enabled in your Zerodha account. You can know more about the enabled exchange here.
@karankotvenkatesh
Can you try installing twisted client for your python version using the below command? Then install the Kiteconnect package.
pip install Twisted‑20.3.0‑cp39‑cp39‑win_amd64.whl
@zaheernanji
For a particular stock "SPIC", web console is showing 24.25 while the ticker is giving 24.05
No, there won't be any difference until you can comparing for difference exchange(NSE and BSE). Both(web and connect WebSocket streaming) uses…
@ameenshabeer
{"status":"error","message":"Invalid `api_key` or `access_token`.","data":null,"error_type":"InputException"}
As the error states, either your requested access_token or api_key is wrong. You can go through this thread to understand mo…
How can I get the final margin requirement , if all the orders in list are to executed at once?
No for now you can't. Currently, we haven't added Basket Order APIs for Kite connect users. We will add this soon and announce the same.
Also, you only need to send trigger_price not stoploss value.Check all CO params here. Also, trigger_price should be lower than current LTP(CMP). This thread will help to understand more on this.
Can I expect two individual on_order_update() with filled_quantity == 1 each?
Yes, you will get two individual order_update with each having different order_id.
You are using Quote APIs not Historical data API. Quote APIs only gives current OHLCV and OI values, not historical. So, on non-trading hour's/day's/weekends, you get the previous last trading OHLCV and OI values.
@Arulmuruga
Couldn't find that `order_id` for exit_order() call
Are you trying to extract order_id field from the exit order response?
exit_order method only have exited order_id number eg: 12345678, not the order_id field. You can check the code h…
@ganeshtupakula
No, there is no specific API endpoint to fetch the option chain. You need to do this at your end, using Websocket data. You can go through this thread to understand the basic flow.
Does Historical Data API provide historical OI data for active option contracts?
Yes, Historical candles do provide OI value along with OHLCV data for the requested candle. You just need to send extra param of oi=1. Go through this documentation.
So I may want to track PnL of this basket and square off all when target or SL is hit.
Positions don't have a tag field, only placing orders have. So, you need to filter the required position/basket of positions at your end.
@vivekmanot
It looks are you are fetching the respective candle data before candle completion. You can go through this thread to understand possible scenario.
@raag
1. It is mandatory by the exchange that a user has to log in manually at least once a day. We don't recommend automating login.
2. Either you can use any client library, which does checksum calculation for you or do it at your end manually us…
@Ronit
For a simple use case, you can store access_token even to a text file and retrieve it while creating a Kite instance. You can go through this article to know about this.
Is there a way I can retrieve data for the Options which are already expired?
No, we store continuous Historical data only for the FUTURES contract, not for OPTIONS.
@KamalChhirang
I mean, can you please tell me the date from which the data is getting adjusted?
Prior to 2019, we haven't adjusted intraday data for all contracts, but only for more active contracts. So, currently, we can't assure you about the fi…
@Tnaagar8 @rji_rji
For the above scenario, it looks are you are fetching the respective candle data before candle completion. You can go through this thread to understand possible scenerio.
@KamalChhirang
Do you adjust the candle from 1st Jan 2017? or 1st Jan 2018?
There is an issue, regarding un-adjusted data from some period around 2015. We are checking on this. Once adjusted you can fetch it from 2015 onwards. We will update here.
…
There was a bonus issue of 1:1 on 2015-03-10. For much older historical data, we adjust corporation action only for day candles, not for intraday candles. So, the difference. For recent historical data(post-2017), we adjust both days as well as intr…
@vidhyaramkumar
We don't have a specific API to fetch strike prices related to the specific contract. Maybe you can calculate the next OPT strike price from FUT LTP and verify the same from the complete instrument dump.
5minute?from=2020-12-24+09:15:00&to=2020-12-24+09:15:00'
For 5minute candle, you don't seem to be requesting the correct interval. Instead, to and fro should be:
5minute?from=2020-12-24+09:15:00&to=2020-12-24+09:19:59'
You can go through th…
Using global variable inside on_connect method is absolutely fine. Above Connection error: 1006, seems to be because of blocking of main thread. You can go python client Websocket FAQs here to know more.
@vivekmanot
There can't be a mismatch between Kite Web and Kiteconnect API Historical data, as both use the same DB. So, until there is some difference for the fetch period param, there can't exist a difference.
Can we get an array or data frame through python API exactly the same?
No, we don't have a specific python method for this. You can just fetch value from this link https://api.kite.trade/margins/equity. Maybe use the python requests library, and ret…
@aadityaj11
As you can see the 15 minute and minute data match but day data does not
Day candle OI includes post-market institutional trades, so the difference. Go through this thread to know about this.
So let's say that I want to extract the OI for 12PM after market close
For historical OI data, you need to use Historical Candle APIs. This has OI data for the respective candle.
quote = kite.quote("NSE:x")
If you want to fetch quote for a list of instruments, you just need to send a list of instruments with their respective exchange. You don't have to double mention exchange "NSE:x" here. It should be:
x=['NSE:ARVIND', 'NSE…
If I modify the order "A1" 20 times, will it reduce my balance to 1979 for the day or order modification is not a part of the 2000 MIS orders per day?
No, your order count will remain the same(here 1999 post 1 "A1" order placement) for the day. You …
"message": "Invalid `api_key` or `access_token`.",
You are not sending the correct access_token or API key. Go through this thread to know more.
I am able to successfully get the instruments list using the same api_key and api_secret
Fetching instr…
For which contract are you fetching historical data? Is it any indices? Can you let us know the contract name/instrument token?
Indices don't have volume and OI.