☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
14.6K
All Categories
0
Incidents
172
Node JS client
48
Go client
822
.Net API client
394
Kite Publisher
549
.Net / VBA / Excel (3rd party)
480
Algorithms and Strategies
1K
Java client
1.2K
API clients
408
PHP client
4.2K
Python client
357
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.5K
General
In this Discussion
August 20
sujith
August 18
salim_chisty
August 20
pankjsingh1028
API Request Limit
pankjsingh1028
August 18
in
Python client
Error: 403 Client Error: Forbidden for url
relogged in and still getting this error, did i breached any daily limit?
Tagged:
api rate limit
rate limits
pankjsingh1028
August 18
also, when i tried to re-login, was getting same ACCESS_TOKEN, though the request token was different
pankjsingh1028
August 18
edited August 18
i was compliant to 10req/sec, is there any hourly or daily limit
or do we any any issues while fetching ltp?
salim_chisty
August 18
You can refer to the API rate limit FAQs
thread
for more details.
sujith
August 20
A 403 http status code means your session is invalid. You need to pass a valid api_key and access_token. You may enable debug logs for pykiteconnect and check if you are passing the right api_key and access_token.
pankjsingh1028
August 20
Error: 403 Client Error: Forbidden for url:
https://api.kite.trade/quote/ltp?i=NSE:INFY&i=BSE:SENSEX&i=NSE:NIFTY+50
other things are working, not able to use /quote
sujith
August 20
You need a Kite Connect app and a valid access_token to fetch live market data. Are you sure you have both?
pankjsingh1028
August 20
def fetch_ltp(api_key, access_token, instruments):
url = "
https://api.kite.trade/quote/ltp
"
headers = {
"X-Kite-Version": "3",
"Authorization": f"token {api_key}:{access_token}"
}
query = "&".join([f"i={inst.replace(' ', '+')}" for inst in instruments])
full_url = f"{url}?{query}"
response = requests.get(full_url, headers=headers)
response.raise_for_status()
data = response.json()
return data["data"]
Sign In
or
Register
to comment.
or do we any any issues while fetching ltp?
other things are working, not able to use /quote
url = "https://api.kite.trade/quote/ltp"
headers = {
"X-Kite-Version": "3",
"Authorization": f"token {api_key}:{access_token}"
}
query = "&".join([f"i={inst.replace(' ', '+')}" for inst in instruments])
full_url = f"{url}?{query}"
response = requests.get(full_url, headers=headers)
response.raise_for_status()
data = response.json()
return data["data"]