failed to open stream: HTTP request failed! HTTP/1.1 429

koushik72
It shows me this error too many times.
Really very bad when you're paying Rs.2000 every month for the api.
Expected a lot better than this from Zerodha since they always claim that they are putting a lot of effort into technology at Zerodha.
  • sujith
    sujith edited May 2017
    Hi @koushik72,
    All HTTP requests are rate limited to 3 per second. If you make more than 3 API calls per second, it will throw error.
  • koushik72
    If I want to get quotes for over 300 stocks by using a loop and I execute that script only once in 15 secs. Will it be considered as more than 3 calls since it has more than 3 stocks?
    Thank you in advance for your answer.
  • sujith
    @koushik72,
    You just need to make sure, you are not making more than 3 API calls in a second.
  • sujith
    For your use case, I would suggest using websocket.
  • koushik72
    Anyway to get quotes for multiple stocks using the
    $response = file_get_contents("https://api.kite.trade/instruments/NSE/INFY?api_key=xxx&access_token=yyy");


    Like we can get quotes for multiple quotes for multiple stocks using websocket (as per the doc)
    like this
    var message = {"a": "subscribe", "v": [128000516, 1111111, 222222]};
  • sujith
    Hi @koushik72,
    It is on our list. We will provide it in future.
  • koushik72
    When is that time gonna come?
  • sujith
    @koushik72,
    We have frozen developing new features till we complete revamp of core apis https://kite.trade/forum/discussion/943/update-revamping-of-core-api-infrastructure
    I am afraid, we can't give you any timeline.
    For now, I would suggest you to fetch quotes every 5 seconds for each scrip.
Sign In or Register to comment.