Im getting an error "Operation Time Out" since last week
Can you give us more information on this? Which end-point is throwing time-out error?
Complete error stack trace/log will be more useful.
@rajagopalsri
Above flow seems fine. Can you re-check, if you are capturing correct request_token, api_key and api_secret?
request_token = open("request_token.txt",'r').read()
key_secret = open("api_key.txt",'r').read().split()
@nivasdhina
Somewhere, you might be re-generating either access token or other user flow auth param.
Can you paste your effecting throwing code? We will take look.
@nivasdhina
but I cannot use the access token which I fetch for more than one time
Are you re-generating access_token for each request?
You need to generate an access token once, store it, and keep using the same access token to make a further req…
@krsna
Day candle historical data should be alright. Can you let us know in detail(contract and date/period) about the issue/gap in historical data, you have mentioned above?
Kite Connect is purely an execution platform which provides APIs for trading terminal features, we don't have any plans of providing API for PMS or other fundamental calculation values.
@kontacthimanshu
15minute?from=2019-11-08+09:30:00&to=2020-11-05+10:30:00
You won't be able to fetch more than 200 days in a single request for a 15minute candle. You can go through Historical Data FAQs to know about all candle fetching period.
@mlearner
Is there a way to get only 1 correct value in a API call made for a 5-min candle from Data API?
Yes. You need to request the exact to and from value, depending on the requested candle period. You can go through this thread to know about t…
@vijoeyz
So, in order to use postbacks, do I have to host my application in cloud?
No, it's not compulsorily. You can even host your postback server locally. You can check the flask example here.
only first time it showed data after that ticker size always 0, can you check please why this is so
Today is a non-trading day. So, you get only one tick(while connection establishment) i.e last tick.
@mlearner
Historical Data API -
date open high low close volume
2020-11-05 09:15:00+05:30 12062.4 12074.55 12055.3 12064.4 0
Kite Charts -
date open high low close volume
2020-11-05 09:15:00+05:30 12062.4 12074.55 12046.15 12051.5 0
We checked for…
@sbdavra
We just checked and haven't encountered the above issue at our end. Can you paste log with a timestamp for the above issue? We will investigate further on this.
Have you set the debug log with logging.basicConfig(level=logging.DEBUG)? We are trying to look at GET request log for historical data. Something like below:
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "GET /instruments/historical/260105…
@XS8910
kite.quote("NSE:NIFTY 50") looks fine. Can you enable Debug log by pasting below at the start of the code and paste the request log here?
import logging
logging.basicConfig(level=logging.DEBUG)
@Divakar58
From the above screen-shot, we see you are placing Trigger price as 445.65, which is lower than at time LTP(452.3). For the Buy SL-M order, you need to place a trigger price higher than LTP. Go through this article scenario 2 to know mor…
@harshlk
By login flow part code, we meant session generation and authentication code i.e access_token generation flow. This flow, we have explained here.
@rish17
We generated the same URL at our end as yours and it's working fine.
https://api.kite.trade/instruments/historical/738561/day?from=2020-10-15+00%3A00%3A00&to=2020-10-23+12%3A26%3A37&continuous=0&oi=0
You can avoid re-building th…
@lakhanisagara
Is there a way to get previous week expiry option data?
No, we don't provide expired option contract data. You can only get live/running option contract data.
@vishank97
The response was "Unable to place the orders The quantity 4950 is higher than the maximum allowed quantity of 2501."
You can go through this article to know more about Freeze quantity and it's list.
@vijoeyz
Yes, it will be intraday trade. You can go through this article to understand more about this.
If qty != 0, then after the sell & buy, will qty == 0 and t1_qty != 0?
After the end buy, your holding quantity will be back to that of the …
@Srikrishna_Rowthu
If a position netQuantity is zero, that position is supposed to be closed?
Yes, netQuantity field should be Zero.
Is there a way to check if the placed order is not completed?
You can check all different order status here. Maybe…
Picked the API key and Access token from there itself
You seem to be getting confused here. You have to get API key and api_secret from developer account not Access token. You need to generate access_token at your end post login. Check the flow here…
@harshlk
Might be you are using the wrong request token to get access_token, you can refer to this documentation to under the login flow. Also, refer to this thread for a similar query.
exceptions.NetworkException: Maximum allowed order requests exceeded
Is this error occurring inside Websocket streaming?
Can you paste the complete error stack trace here?
https://www.dropbox.com/s/njwk8c78aulohbf/PythonApplication1.py?dl=0
print(kite.quote('NSE:INFY'))
We checked this. You don't seem to be setting access_token post generate_session.
You need to set access_token as kite.set_access_token(data["access_t…
The reason, why we don't update the close price of Friday over Weekends is
If we show Friday's close in OHLC, the change% in the market watch will be zero and if users want to see Friday changes it wouldn’t be possible, so we synch data on Monday e…
I'm getting wrong close price for instrument 'BANKNIFTY20OCTFUT' by using API kite.ohlc()
It's not wrong. We update Close on the next trading day. So, Close field would be updated on next trading morning i.e Monday, in above case.
Now at some point of time during the day, my code needs to squareoff this position. How do I go about it ?
There is no special APIs for this. You need to place a regular counter exit order(i.e here BUY, if shorted) to close the above position.
{u'status': u'error', u'message': u'Insufficient permission for that call.', u'error_type': u'PermissionException', u'data': None}
Are you following the correct holdings authorization flow as mentioned here?
So, for this requirement, can I place 1 Market order for SHORT and 1 SL LIMIT order for long ?
Yes, you can use the CO Market for the above order requirement.
"The stop loss trigger price is beyond the allowed range of 20%."
Yes, you need to define…
Can you atleast tell me how to get the margin for EQ, FNO, and currencies.
You can request the required segment margins by sending the segment field, refer to this documentation.
@gkaranam
Then you are not parsing the margins response correctly. Can you paste your complete code for margin fetch here?
Also, it should be kite.margins() not kite.margin()
@samant
Is there any process to let me have a SL of 75% ?
What do you mean by process here? Different Order type?
For CO, you will always be required to set max SL with-in the set range as it's a leveraged product.
AttributeError: 'NoneType' object has no attribute 'positions'
You don't seem to be assigning kite variable before calling it for kite.positions(). You can check an basic python example here and also have look at FAQs.
I want to cancel the remaining qty order .For that I have to place cancel order request with order ID 1 ? right
Yes, you can send a cancel_order request with same order_id.
We don't have any get_positions method in our python client. To fetch complete positions, you need to use positions() method, check the documentation here.
Also, it's throwing None, not 429 as mentioned above. None might be because of no positions.
Same code was working fine till last week & is behaving differently with different API keys now.
It was working before because, we didn't have a hard limit of max 3 connections per API key, but now we have imposed a hard limit of max 3 connectio…
As we have informed above, Websocket Streaming is working fine now within a prescribed limit of max 3 connection/ each having max 4k instruments. We too are investigating very closely on this and haven't encountered any issue post last fix, same bei…
enabled Indicates whether the segment is enabled for the user
Can you go through this article to check, if you're required exchanged is disable for stated reason. You can re-check the same under Console as well.
records = kite.historical_data(token,from_date=from_date,to_date=to_date,interval=interval)
You don't seem to have a Historical data APIs subscription. It's an add-on you need to subscribe to it from the connect developer page. Refer FAQs here.