@vinaychhabra21
Yeah, the closing of 1 minute of last closing candle and 5-minute candle will be same. You can refer below example for SBIN(779521):
5minute candle:
2019-01-11 14:55:00+05:30,303.35,303.6,303.2,303.45,125898
1 Minute candle:
2019-0…
@Guhan
Do you have any specific condition to subscribe to the specific list of instrument token?
You can try something below:
Eg.
def on_connect(ws, response):
if(condition for instrument):
ws.subscribe(token/list of token)
ws.set_m…
@Tusharpatil232
You can go through this doc to understand the process of generating access_token.
Is there any option to generate session for a long time?
No, as per exchange regulation, you need to log manually every trading day.
Access token are …
@ayyaz
Are you getting any difference? For Scrip/instrument token?
Can you check if, your system request time is in sync with real time, not in different time zone?
@vinaychhabra21
The way historical APIs work is, all the ticks in a given period is captured and is written to the database. There can be a delay in write operation to the database. So, to get complete candle OHLCV data, you need to add a buffer pe…
@ayyaz
The way historical APIs work is, all the ticks in a given period is captured and is written to the database. There can be a delay in write operation to the database. So, to get complete candle OHLCV data, you need to add a buffer period of 1…
@ayyaz,
We checked it multiple time, can't find any difference in OHLCV data of historical data and live kite chart. Can you log all historical APIs request along with time stamp at your end?
@ayyaz
We checked the same scenario at our end, historical APIs 15minute OHLCV and Kite web chart 15 minutes OHLCV is matching correctly. In historical APIs, to get exact 15minute/any interval OHLCV data, you need to request it post 10-15 seconds …
@AkashTawade
In KiteTicker WebSocket, you receive data, when ticks happen at the exchange, there is no fixed interval. There can be multiple ticks per second or no ticks.
@vinaychhabra21
We have compared 5-minute candle data of Historical APIs and kite web chart, we weren't able to find any difference in OHLCV on both data.
@meeashok
Can you perform the below step and check if urllib3 module is installed properly.
pip install requests==2.21.0
Open python in interactive mode
python
>>>import requests …
@taiyo
this caused the error, but if i comment f(), and only print the tick in on_tick then no 1006 error came
You are using f() in same thread, you need to kws.connect(threaded=True) and then pass on the value.You can check an example of mult-thre…
@vivekpatil1930
First 5 minute candle will be formed at 9:20, and first 15-minute candle at 9:30, and if you query 5 minute candle before 9:20, it will show OHLC formed till that particular time.So, to get correct 5-minute candle, you need to query…
@taiyo
I didn't get error 1006 when I just print the tick on on_tick function, but I get the error I if start placing orders on on_tick function after some 10 minutes.
You are blocking the main tick thread.You need to pass on the tick value to anot…
@allang
The u' prefix just means it's a Unicode string, in Python 2.X version. So, if you alias your local python environment to 3.X version, you won't get u' prefix.
@IMPB
Can you try installing latest version using pip install kiteconnect==3.7.6
if you are getting any issues related to twisted failing to build wheels.
download appropriate platform twisted wheel from here https://github.com/zerodhatech/python-w…
@ZY9634
You are using older version of Kite Connect request_access_token has been replaced with generate_session in kite connect 3.You can check complete documentation here.
@vivekpatil1930
You can directly fetch previous day/daily OHLC data for stock and index from Historical data APIs, but for week, month and year OHLC you need to fetch specific day OHLC and then calculate the same at your end.
@DA1077
CRUDEOIL18DECFUT already expired on 18-12-2018.
54056967,211160,CRUDEOIL18DECFUT,,0.0,2018-12-18,0.0,1.0,1,FUT,MCX,MCX
If you want to get historical data of DECFUT, you need to use JAN FUT contract instrument token and set continous=1 and i…
@naz
We have checked at our end, we haven't found any error if you subscribe up to 3000 instruments in a single connection. Make sure, you are creating three different WebSocket connection and not merging them in the same thread.
@sachin_dp1942
Yes,NIFTY 50 and NIFTY BANK Index Intraday data is available from 2015. We do provide historical data for major indices.
Edit: NSE INDICES
@allang
We are already looking into both the above errors. For time being, we will request you to handle above exception at your end.
from kiteconnect import exceptions
try:
Your Historical data fetching code logic
except ReadTimeout:
…
@Vaga
We are aware of this issue and already looking to it. For time being, can you use above exception handle method, that will keep requesting historical response, until data is fetched.
@Vaga
We are looking at it. For time being, you can handle ReadTimeout exception at your end, something like:
try:
Your code logic here
except ReadTimeout:
pass
@KrishnaKumbham
Exit of open position and Cancel of pending order is different.To exit an open position,you need to place sell order, as shown here.To cancel an pending order, check this part of documentation.
@sabyasm
Yeah, you can parse below API's:
https://api.kite.trade/margins/futures
https://api.kite.trade/margins/equity
https://api.kite.trade/margins/commodity
https://api.kite.trade/margins/currency
To understand co_upper and co_lower values, go t…
@phantomdrake
It seems you are mixing yesterday instrument file and today's instrument file.
CESC18NOV1240CE is already expired on 2018-11-29(yesterday).
14405122,56270,CESC18NOV1240CE,,0.0,2018-11-29,1240.0,0.05,550,CE,NFO-OPT,NFO
So,14405122 inst…
@yousuf
We are looking into this. As trading holiday calendar is pre-defined, it's easy to implement at your end.You can have list of equity,cds and mcx trading holiday's and skip your segment logic, if today's day falls in any of trading_holiday l…
@sabyasm
We don't store historical data for few indices(which includes NIFTY CONSUMPTION). So, only live feeds can be seen. You can use kite ticker and store them at your end for future reference.
@sagarneo
Yes, the main tick thread is getting blocked. Basically, the idea is to not block the thread which is receiving the ticks,transfer calculation to different thread.
The right solution here would be to offload all your tasks to another thre…
@KarthikJayaprasad
Access token are flushed every day at 7:30 AM and new one is generated every day at 7:35AM.So, make sure you generate access token post 7:35 AM on the trading day.
@sagarneo
We checked your above code(except removing part of on_tick method of extracting tick data in excel).It's working fine.Can you re-check extracting tick data into excel part , it shouldn't be blocking main tick thread?
@anuj_ism
Can you re-check order status of above order_id, it would have executed in between, so you are not able to cancel it.
Also, can you retrive complete individual order status by order_id and check current status?
@Guhan
For calculating option hedge spread, we don't have specific APIs,you need to use Zerodha Margin calculator to check the same.
You can also have look to this thread.
@hardik__
Is there a way to bifurcate orders in kite's dashboard on the basis of source of the order ?
No, can't be done on kite's dashboard but can be using APIs by tagging API placed order.Check it here.