quotes API throttling limits

pavana_capital
From the documentation, websocket can have max 3 connections and max 3k instruments per websocket. This is clear.
for quotes API, max allowed instruments are 500, this is also clear.

I have following questions
1. is there any limit on number of quotes API calls per sec/ per min/ per day ?
2. If I am using websockets all 3 and I want to use quotes API calls ( 4 calls per min each for 500 instrument), is there any issue or limits for using both websocket and quotes API (I will use these for different instruments)

  • sujith
    You can refer to the documentation for api rate limits.
    You can use Websockets API and Quotes API, there is no special restriction, if you are using both. Only individual standard rate limits apply.
  • pavana_capital
    thanks for your quick response.

    Ok, as per this documentation section, limit for Quote is 1req/second.

    I will ensure timeout is added before sending another request but suppose if two quotes API call are made at same time, will the second request get errored out or it will wait for 1 sec before responding?

    also, since WebSocket is continuous connection and not an API call, WebSocket connect should not have any consideration in API limit?
  • rakeshr
    if two quotes API call are made at same time, will the second request get errored out or it will wait for 1 sec before responding?
    It will rejected with 429. Go through the exception list here.
    since WebSocket is continuous connection and not an API call, WebSocket connect should not have any consideration in API limit?
    Yes, you are correct. You will receive tick update for the subscribed tokens. Go through the WebSocket documentation here.
  • pavana_capital
    @rakeshr I have sent quote API request for 494 NIFTY FNO contracts and it seems to be working fine however when I send quote API request for 494 instruments BANKNIFTY, I am getting following error.
        raise ex.DataException("Unknown Content-Type ({content_type}) with response: ({content})".format(
    kiteconnect.exceptions.DataException: Unknown Content-Type (text/html) with response: (b'<html><body><h1>400 Bad request</h1>\nYour browser sent an invalid request.\n</body></html>\n')
    However when I reduce number of instruments of BANKNIFTY to 450, this seems to be working fine. Can you please check why this error for 'BANKNIFTY' contracts.
  • pavana_capital
    can someone from kite API provide clarification on this ?
  • rakeshr
    It's because of the larger length of the payload in the request URL. It's the restriction from the Python requests client.
Sign In or Register to comment.