API Request Limit

pankjsingh1028
Error: 403 Client Error: Forbidden for url

relogged in and still getting this error, did i breached any daily limit?
  • pankjsingh1028
    also, when i tried to re-login, was getting same ACCESS_TOKEN, though the request token was different
  • pankjsingh1028
    pankjsingh1028 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
    You can refer to the API rate limit FAQs thread for more details.
  • sujith
    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
    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
    You need a Kite Connect app and a valid access_token to fetch live market data. Are you sure you have both?
  • pankjsingh1028
    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.