Quote LTP API

skaramo0osh
I'm facing a problem retrieving LTP with the Quotes-LTP API with 1000 instruments per request. With1000 instruments in my request, I get '414 Request-URI Too Large' exception. I found out by trial and error that it can handle upto 825 instruments per request. To be specific, any number between 826 and 900 gives '400 Bad request - Your browser sent an invalid request.' error. And, anything above 900 gives the 'URI too large' error. I'm using Python client. Are there any changes to the limits of this API? Am I missing something?
  • sujith
    It is the url length limit. It is not related to Kite Connect API. You may have to split the API call or use Websockets API.
  • skaramo0osh
    skaramo0osh edited March 4
    Thanks for your response. I understand it now - all the instruments are sent as query params to the LTP endpoint and hence it can hit the URL length limit. I'm using the Quotes LTP API after 9:08 AM and before 9:15 AM to calculate gap percentage for all available equity instruments. I'm splitting the API anyway to get LTP for about ~3000 instruments. I was hoping to use a chunk size of 1000 but right now I have to use 825. But, it still works. I'm using Websockets for live data from 9:15 AM to 3:30 PM.
Sign In or Register to comment.