@xm1160
Is it just me or others also face a lag in live quotes after NSE starts?
You mean Websocket streaming?
For WebSocket data, we relay as receive from the exchange.
I get quotes whose LUT is more than 3-4 minute delayed.
Haven't come across…
Eg: For your postback URL, it's throwing 400. So, here you can re-check on parse method section that, POST method is not missing.
We guess it's throwing 400 status for your postback end-point, as stated above. You need to go through the above point.
Postback is working perfectly fine at our end. There can be multiple reasons for not receiving postback data, eg. incorrect URL, incorrect parsing on received data, etc. You need to debug this at your end. Maybe use postbin to begin with.
Eg: For y…
You need to send price for trigger_price field, as you want to modify pending trigger order not price. You can go through this documentation to understand all order params.
@SUDHEERVYDADI
Going backwards beyond this date 205-01-09.I am not getting any data beyond this data.
We have minute data for Nifty 50 index from 2015-01-09. You can get day candle before that.
@vinod1962
I am able to get historical data for the 2 min interval but when I try to get one minute candle data, it throws "Invalid interval " error.
Can see 2minute requested candle interval in given code snap-shot, not 1minute, as stated above.
…
@zuser
Btw, do websocket feed and kite.quote return exactly the same data if kite.quote is called at the same time tick is received on the socket?
Yes, Quote APIs use Websocket feeds as underlying data.
@gkaranam
kws.on_ticks = on_ticks
kws.on_connect = on_connect
kws.connect()
You are using Websocket Streaming, not Quote APIs. Go through this documentation for Quote APIs.
As the error says, you are sending incorrect api_key or access_token. You can go through this flow to understand login flow. You can go through python FAQs here.
@VijayJoy
2020-08-04 15:29:58 2158.5 42471905
Are you are using volume field from tick data here?
If yes, that's the total volume of the day, till fetched period.
2020-08-04 15:29:00+05:30 75828
And volume field in historical candle, is volume on…
In the 2nd screen-shot, we see you are still performing computation inside on_ticks method in the main thread. You shouldn't do that. Shift all computations to the second thread. You need to go in detail with examples explained here.
if i revoke the app access from kite.zerodha portal will i not incur charges ?
No, this won't help.
what is the way to stop incuring charges for next month?
Only way is to login to app developer dashboard and delete the required App.
@vijoeyz
This is the order history:
You can't cancel an SL trigger pending order. You can only exit it. You need to cancel the Limit pending order not trigger pending order(SL).
@prakash122
You don't need refresh_token for the personal app. It's meant only for the certain approved platform. You can go through all response attribute detail here.
@abysseyes
We have submitted the request for getting the Access token, Public token and the Refresh token.
You need to generate access_token at your end, check out the flow here. And for Refresh token, you need to write to kiteconnect(at)zerodha.co…
@chimirala
It works for one-security but when I loop through multiple instruments, it kept throwing connection timeout error
Historical Data fetch is working fine. There can be multiple reasons for a connection timeout error, it can be requesting s…
@ro207
In that case, is there any way to know / API that I can use to find out what margin was used for a particular executed MIS trade?
Maybe fetch margin available/funds before and after the order placement and calculate.
@seshareddy
Kite Connect is purely an execution platform. We won't be able to provide you any kind of support or solution for writing strategies. You need to sort those at your end.
https://api.kite.trade/instruments/historical/5633/minute?from=2015-12-28&to=2016-01-01&api_key=xxx&access_token=xxx
Are you sending api_key and access_token as header? You can check complete param here.
Also, are you able to make call t…
In regards to the access_token, when I run print(data), this. is what I get:
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
No, print(data) should return this user_detail response, which will have "access_token" f…
@seshareddy
Historical data APIs are high resource consumable APIs. So, fetching historical data for every tick is not recommended and it shouldn't be soo time-constrained as in of the above ticker case.
Maybe you can try the Queue method, as stat…
@debon1410
You need to use instrument_token not symbol for historical data fetch. Check all input param detail for Historical data APIs here.
You can get complete instrument dump from here.
is it possible that this is happening because I am running it on anaconda?
Though there are few permission related issues on Anaconda env, you can refer pyclient FAQs to know. But, above one doesn't seem to be related to Conda env.
Zerodha/Kite, no…
do we have to calculate the average_price for the executed order from the average_price and quantity of individual trades under that order?
You can know the average price for an open position(all intra-day executed order creates open position) from …
The above flow is correct. Unless you copy the wrong request_token or API secret key(available in connect app dev page). Can you once re-check on both of these fields?
Can you paste complete access_token generation code with the flow you do?
Above pasted code seems to be incomplete. As we don't see data variable used for access_token being assigned anywhere. kite.set_access_token(data[access_token])
@seshareddy
Cancelled order was getting multiple times so the error was thrown.
Yeah, as said above, you can always re-check this at your end by required order_id.
@Shah
Also when exiting the CO, what type of order is placed? MRKT?
When you exit CO order, pending stop-loss order is modified to MARKET order and the position is closed.
Do I have the option to have LIMIT?
When you place a CO order, you alread…
@seshareddy
kiteconnect.exceptions.InputException: Order cannot be cancelled as it is being processed. Try later.
Can you re-check if you are cancelling correct order_id(which is trigger_pending)?
Connection error: 1006 - connection was closed uncl…
@bharathkumarchowdary
What was the Connect API endpoint, on which you got Permission Exception?
Can you paste the complete stack trace instead of just an error message?
@praneeth1984
You can handle above DataException and try again with some delay. Eg below:
from kiteconnect import exceptions
try:
# Fetch historical data
except exceptions.DataException:
#Retry Historical data Fetch
@BQ5126
kiteconnect.exceptions.DataException: Unknown Content-Type (text/html) with response: (b"504 Gateway Time-out\nThe server didn't respond in time.\n\n")
We will look into this. You can handle this exception and re-try again.
@apocalypse
1. Whether it's an officially supported endpoint (not sure why this is not there in your documentation)
These are just add-on utility/data dump for the community, not an official endpoint.
2. Whether we can rely on it to give up-to-date…
I am looking for 5-min intraday OHLC values for options/stocks. So say at 1 pm on any trading day, can I access this 5-min OHLC data from beginning of the trading day (9:15 am onwards) using Kite Connect subscription alone?
There is no specific endp…
Does Kite Connect subscription provide OHLC data for instruments for at least the live trading day or for this data as well we have to take Historical data subscription?
What time period OHLC are you looking for? Day or intra-day intervals(minute,h…
After we create an app, can we deploy the same on KiteConnect web console or app has to run at client end only all the time?
You have to run at your end. We don't provide cloud hosting at our end.
If we have to run it at client end only, there is …
@sathish
filled_quantity mean is it bought?
pending_quantity mean is it pending to buy?
Yes. You can go through this article to understand more about order flow.
@sbdavra
No, there was no such issue we encountered at our end. If you come across the same issue again, please give us more detail including logs, so we can debug the same.
{STATUS:SUCCESS,DATA:{ORDER_ID:200710002446622}}.
So, you mean you received the above order status response 16seconds after order placement?
Have you added any delay at your end or maybe check for any race-condition happening at your end?
@chimirala
Is this timeout happening for any specific instrument_token?
Maybe can you paste your historical data fetching code(along with instrument_list)? We will take look at it.
@chimirala
ConnectTimeout
Seems like timeout during the initial connection. Can you increase timeout while initialization and try?
kite = KiteConnect(api_key="your_api_key",timeout=10)
@sachinstlko09
Can you please share the method
There is no specific method at your end. You need to do this at your end, using 60-minute data. You can go through Historical data FAQs, to get more clarity.
@csbhirud
1)in historical api the minutes data is available for options and futures?
Yes, intra-day interval data for current running contract. And day candle for expired contionus contract.
2)this data is available since which year?
Varies from co…
@aditya123
mapping of token of list of particular instruments only
You mean for specific exchange?
For specific exchange, you can append :exchange in instrument dump url.
@venkatsys
Your form data format seems to be correct( even though exchange:NFO and Quantity:25(multiple of 25) .
Can you check, if you are sending the correct Authorization header? No newline should be at the end of the "Authorization" header's