@Amit2 are you using DP2214? you can not use more than one user id for a given app and it can be changed in developers console. Currently DP2214 is the user enabled for the app.
Yes. I am using DP2214. I have only one id. What do u mean by I can not use more than one user id for a given app? U mean multiple request_token from same api_key?
I can see that buy_quantity=0.0 and sell_quantity=0.0 in market depth. But on nseindia.com site its buy_quantity=2,89,800 and sell_quantity=4,38,200 for yesbank may fut.
Are these 2 parameters supported in python kiteconnect client. If yes then why these are 0.0 in response
File "C:\Users\vishi\Desktop\python\test.py", line 394, in data = kite.quote(exchange="NFO", tradingsymbol=nse_fut[i]) File "build\bdist.win-amd64\egg\kiteconnect\__init__.py", line 370, in quote File "build\bdist.win-amd64\egg\kiteconnect\__init__.py", line 427, in _get File "build\bdist.win-amd64\egg\kiteconnect\__init__.py", line 483, in _request kiteconnect.exceptions.ClientNetworkException: Gateway timed out
I am fetching the quote in loop every 2 sec.
2. Due to 1, python client program stops and I need to logout and login again to get new request token because same request_tocken is not working when running python script again after timeout.
('Authentication failed', 'Invalid session credentials') Traceback (most recent call last): File "test.py", line 353, in user = kite.request_access_token(request_token="8jhvtl1aryc4j307m7pftaghkbk4xat3", secret="au2d27v5m3w1vre98m7591wu2k6jvpbe") File "build\bdist.win-amd64\egg\kiteconnect\__init__.py", line 210, in request_access_token File "build\bdist.win-amd64\egg\kiteconnect\__init__.py", line 431, in _post File "build\bdist.win-amd64\egg\kiteconnect\__init__.py", line 513, in _request kiteconnect.exceptions.TokenException: Invalid session credentials
Can you please tell the solution for these 2 issues?
@vishal4kumar Vishal, it's not ideal to poll the quote API, especially every 2 seconds. Please use the WebSocket for streaming data.
Are you requesting the access_token multiple times? It should be done only once (and once an access_token is generated, the request_token you used becomes invalid).
I am also getting the same issue.
{"status": "error", "message": "That API call is not allowed for the authenticated user", "error_type": "PermissionException"}
It seems permission issue. Please give permission for my ID DV0672 api_key=g1kfwgobta6gug12
thanks,
vishal
I fetched quote of YESBANK16MAYFUT and got following in response.
{u'change_percent': -0.25, u'buy_quantity': 0.0, u'last_price': 915.35, u'ohlc': {u'high': 924.0, u'close': 915.6, u'open': 913.75, u'low': 910.75}, u'last_time': None, u'volume': 0, u'depth': {u'sell': [{u'price': -0.01, u'orders': 0, u'quantity': 0}, {u'price': -0.01, u'orders': 0, u'quantity': 0}, {u'price': -0.01, u'orders': 0, u'quantity': 0}, {u'price': -0.01, u'orders': 0, u'quantity': 0}, {u'price': -0.01, u'orders': 0, u'quantity': 0}], u'buy': [{u'price': -0.01, u'orders': 0, u'quantity': 0}, {u'price': -0.01, u'orders': 0, u'quantity': 0}, {u'price': -0.01, u'orders': 0, u'quantity': 0}, {u'price': -0.01, u'orders': 0, u'quantity': 0}, {u'price': -0.01, u'orders': 0, u'quantity': 0}]}, u'sell_quantity': 0.0, u'open_interest': 0.0, u'last_quantity': 700, u'change': -0.02}
I can see that buy_quantity=0.0 and sell_quantity=0.0 in market depth. But on nseindia.com site its
buy_quantity=2,89,800 and sell_quantity=4,38,200 for yesbank may fut.
Are these 2 parameters supported in python kiteconnect client. If yes then why these are 0.0 in response
Thanks,
Vishal
Hi Kailash,
I am facing 2 issues-
1. I am getting timeout in fetching the quote.
File "C:\Users\vishi\Desktop\python\test.py", line 394, in
data = kite.quote(exchange="NFO", tradingsymbol=nse_fut[i])
File "build\bdist.win-amd64\egg\kiteconnect\__init__.py", line 370, in quote
File "build\bdist.win-amd64\egg\kiteconnect\__init__.py", line 427, in _get
File "build\bdist.win-amd64\egg\kiteconnect\__init__.py", line 483, in _request
kiteconnect.exceptions.ClientNetworkException: Gateway timed out
I am fetching the quote in loop every 2 sec.
2. Due to 1, python client program stops and I need to logout and login again to get new request token because same request_tocken is not working when running python script again after timeout.
('Authentication failed', 'Invalid session credentials')
Traceback (most recent call last):
File "test.py", line 353, in
user = kite.request_access_token(request_token="8jhvtl1aryc4j307m7pftaghkbk4xat3", secret="au2d27v5m3w1vre98m7591wu2k6jvpbe")
File "build\bdist.win-amd64\egg\kiteconnect\__init__.py", line 210, in request_access_token
File "build\bdist.win-amd64\egg\kiteconnect\__init__.py", line 431, in _post
File "build\bdist.win-amd64\egg\kiteconnect\__init__.py", line 513, in _request
kiteconnect.exceptions.TokenException: Invalid session credentials
Can you please tell the solution for these 2 issues?
Thanks,
Vishal
Are you requesting the access_token multiple times? It should be done only once (and once an access_token is generated, the request_token you used becomes invalid).
Thanks for suggestion. Is websocket library for python client available for use?
Thanks,
Vishal
Not yet, but we'll be releasing it very soon. In the meanwhile, a Kite Connect user has released a Java library https://github.com/instruritesh/ZStreamingQuote
"That API call is not allowed for the authenticated user"
Please check if it is not enabled for user id DA3085